Commit graph

6735 commits

Author SHA1 Message Date
Marcel Hibbe
f05b218743
Extract worker initialization
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 16:24:15 +01:00
Marcel Hibbe
6a7f54a5bf
Remove debug toast messages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 15:12:16 +01:00
Marcel Hibbe
abd1d4b247
Remove to set localParticipantMessageListener in joinRoom
this is already done in onAttach which seems to do the job fine after using workManager queues and fixing to set externalSignalingServer to user.
See commits da1714bb and 29a37086

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 14:44:20 +01:00
Marcel Hibbe
609e5a2c71
Use WorkManager queue to chain workers.
This is necessary as many of the workers store user data. When running in parallel, there are race conditions and user data that was stored by one worker gets directly overwritten by the next worker. E.g. this happened with the "externalSignalingServer" attribute of user:
SignalingSettingsWorker saved the user with the externalSignalingServer value, but then
CapabilitiesWorker kicked in and saved the user without this value.

Because of this, in WebsocketConnectionsWorker getExternalSignalingServer() of the user was null.
Because of this, webSocketConnectionHelper.getExternalSignalingInstanceForServer(..) was not called.
So the webSocketInstanceMap in WebSocketConnectionHelper was never filled.
This is why WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(..) in ChatController failed to get a webSocketInstance.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 14:44:20 +01:00
Marcel Hibbe
8c991c697f
Fix to save externalSignalingServer to user
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 14:44:20 +01:00
Marcel Hibbe
9882ddc536
Fix logic in workers when user was not found
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 14:44:20 +01:00
Marcel Hibbe
39441ae075
Move setupWebsocket() to onAttach() in ChatController
Add toast warning for debug mode

Rename "magic" stuff

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-10 14:25:49 +01:00
Andy Scherzinger
6d181860d0
Merge pull request #2853 from nextcloud/dependabot/gradle/org.mockito-mockito-core-5.2.0
Build(deps): Bump org.mockito:mockito-core from 5.1.1 to 5.2.0
2023-03-10 11:01:06 +01:00
Nextcloud bot
adb97eb397
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-10 04:38:35 +00:00
Nextcloud bot
f1bb10b27f
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-10 04:38:14 +00:00
dependabot[bot]
b52bd534e7
Build(deps): Bump org.mockito:mockito-core from 5.1.1 to 5.2.0
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.2.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-10 02:58:31 +00:00
Marcel Hibbe
1a820a9730
Merge pull request #2848 from nextcloud/bugfix/noid/fixHorizontalCallDesign
Fix horizontal (=landscape) call design
2023-03-09 20:43:25 +01:00
Marcel Hibbe
a6ff8da18b
Fix horizontal (=landscape) call design
Without this fix, the call buttons became huge in landscape mode.

The LinearLayout of the callControls now has a fixed width which comes in handy in landscape mode.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 16:16:12 +01:00
Marcel Hibbe
0fabb73058
Merge pull request #2845 from nextcloud/bugfix/2814/avoidDuplicatedMessagesAfterHistoryPull
Bugfix/2814/avoid duplicated messages after history pull
2023-03-09 16:13:08 +01:00
Marcel Hibbe
b10558eee8
Avoid shadowed warning for xChatLastCommonRead
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 14:05:54 +01:00
Marcel Hibbe
6efbbae823
Extract creation of fieldMap for pullChatMessages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 14:01:34 +01:00
github-actions
2a4ac69d89
Analysis: update lint results to reflect reduced error/warning count
Signed-off-by: github-actions <github-actions@github.com>
2023-03-09 13:49:05 +01:00
Marcel Hibbe
82abb9d9bd
Fix to avoid duplicated messages for HTTP_CODE_NOT_MODIFIED
the "historyRead" didn't make any sense to me, and deleting it solved the issue to avoid duplicated messages when the response was HTTP_CODE_NOT_MODIFIED

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:05 +01:00
Marcel Hibbe
67957996b0
Fix duplicated messages after history loading
The solution was to avoid recursive call off pullChatMessages if lookIntoFuture is false.
However the recursive call has to be made when fetching messages for the first time:

if (isFirstMessagesProcessing || lookIntoFuture) {
    pullChatMessages(true,...)
}

For this, setting of isFirstMessagesProcessing had to be moved below this code.

Furthermore in the commit:
add logging & refactoring

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:04 +01:00
Marcel Hibbe
7f77cf8c8e
Refactor pullChatMessages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:04 +01:00
Marcel Hibbe
6f4a24b28f
Refactor (delete lookingIntoFuture)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:04 +01:00
Marcel Hibbe
7065b18d07
Refactor pullChatMessages request
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:04 +01:00
Marcel Hibbe
21606bc9c1
Make setReadMarker parameter boolean
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:03 +01:00
Marcel Hibbe
3d6674e35a
Make lookIntoFuture parameter boolean
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-09 13:49:02 +01:00
Nextcloud bot
6b6dff9e43
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-09 04:38:29 +00:00
Nextcloud bot
4b48016b32
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-09 04:38:09 +00:00
Nextcloud bot
d4e22da91b
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-08 04:37:01 +00:00
Nextcloud bot
075ce66b25
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-08 04:36:40 +00:00
Andy Scherzinger
6ad498818d
Merge pull request #2844 from nextcloud/feature/noid/scrollingInChatEnhancements
Scroll to quoted message also for outgoing messages
2023-03-07 16:19:58 +01:00
Marcel Hibbe
397b498d48
Merge pull request #2841 from nextcloud/bugfix/noid/avoidNpeStartCall
Fix rare crash when starting call
2023-03-07 10:32:24 +01:00
Marcel Hibbe
f3a057b0e4
Set currentConversation when joinRoom succeeds
currentConversation should have already been set, but it makes sense to set it with the most current data of this case.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-07 10:31:47 +01:00
Marcel Hibbe
1f8859e1a6
avoid NPE when starting call
Exception java.lang.NullPointerException:
  at com.nextcloud.talk.controllers.ChatController.startACall (ChatController.kt:2792)
  at com.nextcloud.talk.controllers.ChatController.onOptionsItemSelected (ChatController.kt:2699)
  at com.bluelinelabs.conductor.Controller.optionsItemSelected (Controller.java:1399)
  at com.bluelinelabs.conductor.Router.onOptionsItemSelected (Router.java:703)
  at com.bluelinelabs.conductor.internal.LifecycleHandler.onOptionsItemSelected (LifecycleHandler.java:282)
  at android.app.Fragment.performOptionsItemSelected (Fragment.java:2652)
  at android.app.FragmentManagerImpl.dispatchOptionsItemSelected (FragmentManager.java:3189)
  at android.app.FragmentController.dispatchOptionsItemSelected (FragmentController.java:374)
  at android.app.Activity.onMenuItemSelected (Activity.java:4517)
  at androidx.activity.ComponentActivity.onMenuItemSelected (ComponentActivity.java:514)
  at androidx.fragment.app.FragmentActivity.onMenuItemSelected (FragmentActivity.java:352)
  at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected (AppCompatActivity.java:266)
  at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:110)
  at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick (ToolbarActionBar.java:66)
  at androidx.appcompat.widget.Toolbar$1.onMenuItemClick (Toolbar.java:221)
  at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected (ActionMenuView.java:781)
  at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:836)
  at androidx.appcompat.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:159)
  at androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:987)
  at androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:977)
  at androidx.appcompat.widget.ActionMenuView.invokeItem (ActionMenuView.java:625)
  at androidx.appcompat.view.menu.ActionMenuItemView.onClick (ActionMenuItemView.java:156)
  at android.view.View.performClick (View.java:7881)
  at android.widget.TextView.performClick (TextView.java:16203)
  at android.view.View.performClickInternal (View.java:7858)
  at android.view.View.-$$Nest$mperformClickInternal
  at android.view.View$PerformClick.run (View.java:30863)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8772)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-07 10:31:46 +01:00
Marcel Hibbe
949a3fb6c4
Scroll to quoted message also for outgoing messages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-07 09:17:50 +01:00
Nextcloud bot
afbdf33fcb
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-07 04:30:58 +00:00
Nextcloud bot
5f5d820470
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-07 04:30:38 +00:00
Marcel Hibbe
17f92d323c
Merge pull request #2837 from nextcloud/bugfix/2836/fixNpeInVoiceMessageRecording
Avoid NPE for voice message recording
2023-03-06 15:11:40 +01:00
Marcel Hibbe
9367eb1a49
Avoid NPE for voice message recording
Exception java.lang.NullPointerException:
  at com.nextcloud.talk.controllers.ChatController$onViewBound$11.onTouch (ChatController.kt:867)
  at android.view.View.dispatchTouchEvent (View.java:15540)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3316)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2990)
  at com.android.internal.policy.DecorView.superDispatchTouchEvent (DecorView.java:1112)
  at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent (PhoneWindow.java:1971)
  at android.app.Activity.dispatchTouchEvent (Activity.java:4388)
  at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java:70)
  at com.android.internal.policy.DecorView.dispatchTouchEvent (DecorView.java:1070)
  at android.view.View.dispatchPointerEvent (View.java:15803)
  at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent (ViewRootImpl.java:8153)
  at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:7877)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:7213)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:7270)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:7236)
  at android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:7434)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:7244)
  at android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:7491)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:7217)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:7270)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:7236)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:7244)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:7217)
  at android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:10788)
  at android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:10676)
  at android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:10632)
  at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent (ViewRootImpl.java:10926)
  at android.view.InputEventReceiver.dispatchInputEvent (InputEventReceiver.java:285)
  at android.os.MessageQueue.nativePollOnce
  at android.os.MessageQueue.next (MessageQueue.java:335)
  at android.os.Looper.loopOnce (Looper.java:186)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8757)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-06 15:10:50 +01:00
Marcel Hibbe
1add979750
Merge pull request #2833 from nextcloud/bugfix/2774/showKeyboardAtClickOnEmptySpace
Show keyboard at click on empty space
2023-03-06 15:05:51 +01:00
Marcel Hibbe
e1fbdf89ea Show keyboard at click on empty space
fix #2774

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-06 12:53:40 +00:00
Marcel Hibbe
1b843d85d9
Merge pull request #2835 from nextcloud/bugfix/2834/avoidNPEscrollToMessage
Avoid NPE (replace scrollToPositionWithOffset(..) with scrollToPositi…
2023-03-06 13:38:36 +01:00
Marcel Hibbe
16a0ef8dcf
Avoid NPE (replace scrollToPositionWithOffset(..) with scrollToPosition(0))
Exception java.lang.NullPointerException:
  at com.nextcloud.talk.controllers.ChatController.processMessagesFromTheFuture (ChatController.kt:2500)
  at com.nextcloud.talk.controllers.ChatController.processMessages (ChatController.kt:2443)
  at com.nextcloud.talk.controllers.ChatController.processMessagesResponse (ChatController.kt:2404)
  at com.nextcloud.talk.controllers.ChatController.access$processMessagesResponse (ChatController.kt:221)
  at com.nextcloud.talk.controllers.ChatController$pullChatMessages$2.onNext (ChatController.kt:2315)
  at com.nextcloud.talk.controllers.ChatController$pullChatMessages$2.onNext (ChatController.kt:2300)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal (ObservableObserveOn.java:201)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run (ObservableObserveOn.java:255)
  at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run (HandlerScheduler.java:124)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:201)
  at android.os.Looper.loop (Looper.java:288)
  at android.app.ActivityThread.main (ActivityThread.java:7872)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936)

 I don't know why scrollToPositionWithOffset was used. scrollToPosition(0) works just fine.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-06 12:09:17 +01:00
Andy Scherzinger
af2dba94b7
Merge pull request #2832 from nextcloud/dependabot/gradle/org.jlleitschuh.gradle-ktlint-gradle-11.3.1
Build(deps): Bump org.jlleitschuh.gradle:ktlint-gradle from 11.2.0 to 11.3.1
2023-03-06 09:13:34 +01:00
Nextcloud bot
94399a1833
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-06 04:34:21 +00:00
Nextcloud bot
9214b5b9a2
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-06 04:34:01 +00:00
Nextcloud Android Bot
362da7efed Weekly 16.1.0 Alpha 03 2023-03-06 03:15:32 +00:00
dependabot[bot]
6c9efac031
Build(deps): Bump org.jlleitschuh.gradle:ktlint-gradle
Bumps org.jlleitschuh.gradle:ktlint-gradle from 11.2.0 to 11.3.1.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 02:57:25 +00:00
Nextcloud bot
a2c95b34fa
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-05 04:33:30 +00:00
Nextcloud bot
8b4a320e5a
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-05 04:33:10 +00:00
Nextcloud bot
c9f75ba5ad
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-04 04:32:23 +00:00
Nextcloud bot
8abc1cc8ab
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-03-04 04:32:03 +00:00