Commit Graph

7837 Commits

Author SHA1 Message Date
Marcel Hibbe
1f105d44d3
check if scope is active during long polling
Because long polling may have to be informed that the scopep was cancelled, the isActive checks are added so it can't happen that messages are added when they shouldn't.

I could not reproduce the scenario, anyway the checks should make sense in my opinion.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-22 13:54:31 +01:00
Marcel Hibbe
b6e341bbf1
cancel scope when onStop is reached
This is necessary especially to cancel the long polling when configuration change was made, e.g. screen was rotated. Otherwise multiple long polling requests would be running after configuration changes.

Because it not possible to launch a new coroutine in a scope that was canceled, it is necessary to re-initialize the scope.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-22 13:50:30 +01:00
Nextcloud bot
504846593b
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-22 03:05:52 +00:00
Nextcloud bot
136ad56bf3
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-21 03:04:00 +00:00
Marcel Hibbe
28ffb7f971
enable to select authentication cert in server selection screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-20 10:35:53 +01:00
Nextcloud Android Bot
d450c470fe Weekly 21.0.0 Alpha 10 2025-01-20 03:12:34 +00:00
Nextcloud bot
aa42f5c253
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-20 02:58:46 +00:00
Nextcloud bot
fba4e948b2
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-18 03:02:52 +00:00
Marcel Hibbe
779c1627aa
Merge pull request #4620 from nextcloud/fix/4557/reactionsBackground
Fix reactions background
2025-01-17 12:14:41 +00:00
Nextcloud bot
115f5e372e
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-17 03:02:33 +00:00
Andy Scherzinger
9fcd466576
style(icons): Update pdf icon to latest server version / material symbols
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 18:25:07 +01:00
Andy Scherzinger
9e3840c3a9
style(lint): replace magic number with constant
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 16:29:39 +01:00
Andy Scherzinger
e4088d0ddc
style(lint): Fix formatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 15:57:24 +01:00
Andy Scherzinger
0a6a1a703f
style(reactions): Add default vertical spacing at top of reactions
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 15:53:30 +01:00
Andy Scherzinger
a2dac5e0fa
style(reactions): ensure correct color coding of own reaction backgrounds
Resolves #4557

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 15:40:54 +01:00
Andy Scherzinger
b26b598a6c
style(reactions): Align reactions with text for preview messages
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 15:40:53 +01:00
Andy Scherzinger
9e7996b766
style(reaction): make reactions background rounded instead of pill-styled
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-01-16 15:40:53 +01:00
Marcel Hibbe
383546eb97
Merge pull request #4598 from nextcloud/bugfix/4503/fixTooManyRequestsException
fix TooManyRequestsException
2025-01-16 14:18:02 +00:00
Marcel Hibbe
69ddeaa06a
use lifecycleScope from chatActivity in OutcomingTextMessageViewHolder
defining an own scope and clearing it via onViewRecycled did not work out somehow (offline icon was wrong)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-16 14:29:12 +01:00
renovate[bot]
0eabff6176
Update dependency androidx.datastore:datastore-preferences to v1.1.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 13:20:27 +00:00
renovate[bot]
ed13698c8f
Update dependency androidx.datastore:datastore-core to v1.1.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 12:55:06 +00:00
Marcel Hibbe
6e1114d4d8
fix TooManyRequestsException
By using
networkMonitor.isOnline.first()
the function
unregisterNetworkCallback
was triggered, which sometimes causes the ConnectivityManager$TooManyRequestsException.

So each time isOnline.first() was called, the callbackFlow would:
- Register a new NetworkCallback.
- Emit a value and cancel the flow.
- Unregister the NetworkCallback.

The exception was:
Exception android.net.ConnectivityManager$TooManyRequestsException:
  at android.net.ConnectivityManager.convertServiceException (ConnectivityManager.java:3771)
  at android.net.ConnectivityManager.sendRequestForNetwork (ConnectivityManager.java:3960)
  at android.net.ConnectivityManager.sendRequestForNetwork (ConnectivityManager.java:3967)
  at android.net.ConnectivityManager.registerNetworkCallback (ConnectivityManager.java:4349)
  at android.net.ConnectivityManager.registerNetworkCallback (ConnectivityManager.java:4319)
  at com.nextcloud.talk.data.network.NetworkMonitorImpl$isOnline$1.invokeSuspend (NetworkMonitorImpl.kt:61)

To fix this, the cold flow from callbackFlow is converted to a StateFlow.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-16 13:50:51 +01:00
Marcel Hibbe
ce7ed877ca
Merge pull request #4611 from nextcloud/bugfix/4610/fixNpeCurrentUserInConvList
hopefully fix NPE for currentUser in addToConversationItems
2025-01-16 12:48:53 +00:00
Nextcloud bot
44c84dd1c5
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-16 03:02:48 +00:00
Marcel Hibbe
13e5626159
hopefully fix NPE for currentUser
It seems there could have been a race condition because currentUser was initialized too late.
 I was not able to reproduce but hopefully this fixes it:
 - initialize currentUser earlier (moved from onResume to onCreate)
 - use currentUserProvider instead userManager

NPEs were reported via gplay:

1)
Exception java.lang.NullPointerException:
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.addToConversationItems (ConversationsListActivity.kt:851)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.access$addToConversationItems (ConversationsListActivity.kt:151)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invokeSuspend (ConversationsListActivity.kt:394)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invoke (Unknown Source:8)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invoke (Unknown Source:4)

2)
Exception java.lang.RuntimeException:
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:5427)
  at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:5508)
  ...
Caused by java.lang.NullPointerException:
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.shouldShowNotificationWarning (ConversationsListActivity.kt:1557)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-15 19:11:24 +01:00
parneet-guraya
6c67bf7b96
timeout option immediate
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-15 11:28:32 +01:00
Marcel Hibbe
db8c4de028
fix to not cut off unread mentions bubble
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-15 10:33:52 +01:00
Nextcloud bot
172eddb217
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-15 03:03:33 +00:00
rapterjet2004
19aec5460a
figured it out - was an error with offline conversations not syncing. Chat permissions were updated on server, but not on device.
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-14 16:35:55 +01:00
Nextcloud bot
f0d7ff53c6
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-14 01:43:51 +00:00
Nextcloud Android Bot
36716fa788 Weekly 21.0.0 Alpha 09 2025-01-13 03:12:47 +00:00
Nextcloud bot
6638f449a6
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-13 03:01:44 +00:00
Nextcloud bot
d3b3052436
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-12 03:13:26 +00:00
Nextcloud bot
7851de68e9
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-11 03:01:45 +00:00
github-actions[bot]
60bae8784e
Merge pull request #4587 from nextcloud/renovate/daggerversion
Update daggerVersion to v2.55
2025-01-10 13:00:09 +00:00
renovate[bot]
6ed20f4b13 Update daggerVersion to v2.55
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 13:42:47 +01:00
Marcel Hibbe
cd096366c5
change icons for message sending and messages sending failed
remove shadowed var

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 13:18:47 +01:00
Marcel Hibbe
68065d7e21
fix lint warning
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:32 +01:00
Marcel Hibbe
aa5b4d028a
remove click listener for failed messages (use default longclick)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:32 +01:00
Marcel Hibbe
3094054b73
change visibility of temp message actions
during sending: edit and delete should not be shown..

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:32 +01:00
Marcel Hibbe
1504e51499
add strings for message status icons
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:32 +01:00
Marcel Hibbe
1731ca0985
remove flickering of status icons
by moving networkMonitor.isOnline to separate check and by setting
binding.checkMark.visibility = View.INVISIBLE
binding.sendingProgress.visibility = View.GONE
before setting the status icons
to to handle recyclerview behavior

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:32 +01:00
Marcel Hibbe
f665b1c116
save "silent" in chat messages (incl DB)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:32 +01:00
Marcel Hibbe
3fdaa4bdcd
fix parent message for temp messages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:31 +01:00
Marcel Hibbe
4c795139ac
add DB migration
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:31 +01:00
Marcel Hibbe
a58607b547
resolve detekt warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:31 +01:00
Marcel Hibbe
560f955002
comment in opHelperFactory
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:31 +01:00
Marcel Hibbe
3dca00bac0
resolve warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:31 +01:00
Marcel Hibbe
ab007fc444
resolve codacy/ktlint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:30 +01:00
Marcel Hibbe
8f1f22fd54
Fix duplicate "Today"-bug
If user sent a message as a first message in today's chat, the temp message will be deleted when messages are retrieved from server, but also the date has to be deleted as it will be added again when the chat messages are added from server. Otherwise date "Today" would be shown twice.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-01-10 12:32:30 +01:00