Otherwise, it resulted in a lot of flickering because _lastCommonReadFlow was emitted every 500ms. And anyway if we know we are offline or paused then it doesn't make sense to execute the sync method.
chain which caused the flickering was:
updateUiForLastCommonRead (_lastCommonReadFlow) -> updateReadStatusOfAllMessages - notifyDataSetChanged -> onBindViewHolder -> IncomingLinkPreviewMessageViewHolder
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
In dark mode, the call buttons looked like disabled otherwise.
There is still the 3-dots menu next to the call icons like disabled for dark and light mode. But this is a different bug that needs to be fixed in another branch(could not find the reason for now).
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
same for swipeRefreshLayoutView?.isRefreshing
If searchHelper would be null (= when UnifiedSearch is not available) then going back to conversations list view would not trigger to check to show for unread mentions bubble. This fix will make it independent from searchHelper.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
no idea how this happens, however this was
reported via gplay pre launch report for 20.0.0RC1
("Detected on 10 devices during testing"):
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.nextcloud.talk.data.user.model.User.getBaseUrl()' on a null object reference
at com.nextcloud.talk.activities.BaseActivity.startActivity (BaseActivity.kt:240)
at com.nextcloud.talk.account.ServerSelectionActivity.showVisitProvidersInfo$lambda$5 (ServerSelectionActivity.kt:206)
at com.nextcloud.talk.account.ServerSelectionActivity.$r8$lambda$pjpPT-LQbGLSCJPXeRE8IJvpLIE
at com.nextcloud.talk.account.ServerSelectionActivity$$ExternalSyntheticLambda0.onClick (D8$$SyntheticClass)
at android.view.View.performClick (View.java:7506)
at android.view.View.performClickInternal (View.java:7483)
at android.view.View.-$$Nest$mperformClickInternal
at android.view.View$PerformClick.run (View.java:29335)
at android.os.Handler.handleCallback (Handler.java:942)
at android.os.Handler.dispatchMessage (Handler.java:99)
at androidx.test.espresso.base.Interrogator.loopAndInterrogate (Interrogator.java:10)
at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:7)
at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:1)
at androidx.test.espresso.base.UiControllerImpl.injectMotionEvent (UiControllerImpl.java:5)
at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:6)
at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:1)
at androidx.test.espresso.action.Tap.sendSingleTap (Tap.java:5)
at androidx.test.espresso.action.Tap.-$$Nest$smsendSingleTap
at androidx.test.espresso.action.Tap$1.sendTap (Tap.java:1)
at androidx.test.espresso.action.GeneralClickAction.perform (GeneralClickAction.java:4)
at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform (ViewInteraction.java:2)
at androidx.test.espresso.ViewInteraction.doPerform (ViewInteraction.java:23)
at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform
at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:6)
at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:1)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
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:7898)
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)
If baseUrl is really missing this may lead to followup issues, however this maybe only 'happens' in gplay pre launch report without any real world scenario. A best solution may be to make baseUrl not nullable, but don't want to do this on short term before release..
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
...for ConversationCreationActivity and ContactsActivityCompose
just a quick fix, this may not be the best solution!
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
the bug was, that the sent text was overwritten with "" in restoreState.
With this fix the saved state is only applied when the input field is empty (which means there was nothing shared)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Got join conversation to work
Unread message popup should work when entering a conversation now
"Delete All Messages" now works without breaking the initMessagePolling
linter
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This will fix to scroll to the last read message when a chat is opened.
Some refactorings were made that are not necessary for the fix (I tried to also show the "Unread messages" hint in the adapter but came to the conclusion this is not a good idea until chatkit is removed. Chatkit doesn't support to add some item in between but only at the end or start which will make it too complicated..)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Before, old conversations that were left still occurred in the list (only adding+updating was done, but never deleting)
also, the list is up to date when coming back from chat. Otherwise there may be unread messages shown for a short moment which were already read.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
method was extracted for other purposes but was not used in the end. Anyway it made sense to use it for resumeAudioPlaybackIfNeeded.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
fix to show unreadMessagesPopup at bottom (typingIndicatorWrapper must not be gone but invisible)
align unreadMessagesPopup to not overlap typingIndicator
fix to hide scrollDown button when unreadMessagesPopup is shown
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
replace key ban_actor with ban_participant
fix upper/lower case
fix to use translation in ConversationInfoActivity instead hardcoded string
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- New option to ban participant if your a moderator and not in one-2-one
- New fragment to see previous bans, unban if wanted
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
otherwise this will cause:
Execution failed for task ':app:generateGplayDebugAndroidTestLintModel'.
> Could not resolve all files for configuration ':app:gplayDebugAndroidTestRuntimeClasspath'.
> Could not find androidx.compose.ui:ui-test-junit4:.
Required by:
project :app
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
When opening the chat the app crashed with
2024-06-18 10:59:45.039 30757-30757 AndroidRuntime com.nextcloud.talk2 E FATAL EXCEPTION: main
Process: com.nextcloud.talk2, PID: 30757
java.lang.StackOverflowError: stack size 8192KB
at com.nextcloud.talk.ui.MessageInput.getMessageSendButton(MessageInput.kt:75)
Hint in AS was:
Now field from base class com.stfalcon.chatkit.messages.MessageInput shadows the property with custom getter from derived class com.nextcloud.talk.ui.MessageInput. This behavior will be changed soon in favor of the property. Please use explicit cast to com.stfalcon.chatkit.messages.MessageInput if you wish to preserve current behavior. See https://youtrack.jetbrains.com/issue/KT-55017 for details
The issue is caused by the update to kotlin2.0.
Calling the super fields fixes the issue.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Exception java.lang.NullPointerException:
at com.nextcloud.talk.conversationinfo.ConversationInfoActivity.handleConversation (ConversationInfoActivity.kt:686)
at com.nextcloud.talk.conversationinfo.ConversationInfoActivity.access$handleConversation (ConversationInfoActivity.kt:94)
at com.nextcloud.talk.conversationinfo.ConversationInfoActivity$initObservers$2.invoke (ConversationInfoActivity.kt:232)
at com.nextcloud.talk.conversationinfo.ConversationInfoActivity$initObservers$2.invoke (ConversationInfoActivity.kt:227)
at com.nextcloud.talk.conversationinfo.ConversationInfoActivity$sam$androidx_lifecycle_Observer$0.onChanged
Handle conversation is called when capabilities are retrieved, which can occur before databaseStorageModule is created. The fix was to call initObservers after the module was created.
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
With this change, all links that target files in the same nextcloud instance will be opened in the files app, no matter on which screen the link was.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
ic_notification.xml was not existing/not used in android talk app, but on brander there is code to replace ic_notification.xml with a custom icon.
ic_notification.xml is now created with the same icon as for ic_logo.xml and used for notifications. So from now on branded versions have the ability to overwrite the icon.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
initMessageInputView() is called repeatedly when capabilities are received. This is not a good solution but was done because capabilities are needed inside initMessageInputView().
As sharedText is set inside initMessageInputView(), this caused the bug that text was repeatedly inserted in to the message input field.
All in all, there is only the need to initialize initMessageInputView() once. With this fix, it is for now done when there is no filter set yet. As a long term solution, the architecture must be changed so that initMessageInputView() is not called repeatedly, but all UI elements that need capabilities etc are updated by livedata.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Large enough to prevent onLoadMore from calling refresh on a few messages, but small enough to refresh when needed.
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
without this fix, the text when editing a message was lost after pulling chat messages (30sec), because inputEditText was initialized again with the initial text
As a fix, message editing is only initialized once when the edit button was clicked.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Before this fix, KEY_CALL_VOICE_ONLY was not included in the intent extras so call always started as videocall
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Fix to check if a conversation is "Note to self" by checking the ConversationType instead to check conversation name by hardcoded string
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The get-room request in CallNotificationActivity was sometimes too slow which caused the activity to be unresponsive.
With this commit, the room is first loaded before the user gets a notification.
For now all necessary values are passed as intent extras. In the future with offline support, there might be reasons to load it from DB in CallNotificationActivity.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
this seems to be a relict caused by conductor back then.
CallNotificationActivity is opened directly.
There shouldn't have been any scenario anymore when it would be opened by MainActivity.
Back then with conductor, this was done because there must have been an activity to open which then opened a controller.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
without this, there would be http 404 error (nothing was shown to user):
2024-04-11 15:34:30.612 18641-18641 ProfileBottomSheet com.nextcloud.talk2 E Failed to get hover card for user user@yourfereatedserver.dev
retrofit2.adapter.rxjava2.HttpException: HTTP 404
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:608)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
With this fix, nothing happens when clicking on a federated user avatar, just like in web and iOS.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
without this, there would be the common error message shown because of a http 404 error.
With this fix, nothing happens when clicking on a federated user mention chip, just like in web and iOS.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
bug was introduced with commit 754b8250
As a result, for example the delete conversation option was not shown.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
checkbox was cut off to the left. probably some material design update changed this. Now there is no need to modify the margin anymore.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Sometimes the polls dialog seemed to not load the content.
This was caused by the showLoadingScreen logic using binding.root.post which overwrote the content depending on if the showResultsScreen or showVoteScreen already set the content. So it was a race conditions that sometimes it worked and sometimes not.
Additionally, calculating the height failed in showLoadingScreen, so in the end there was only the headline visible and even not loading spinner. This is now replaced by a fixed height.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
NPE without this fix:
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
at android.content.ComponentName.<init> (ComponentName.java:132)
at android.content.Intent.<init> (Intent.java:8269)
at com.nextcloud.talk.conversation.CreateConversationDialogFragment.initiateConversation (CreateConversationDialogFragment.kt:276)
at com.nextcloud.talk.conversation.CreateConversationDialogFragment.access$initiateConversation (CreateConversationDialogFragment.kt:63)
at com.nextcloud.talk.conversation.CreateConversationDialogFragment$addParticipants$1.invoke (CreateConversationDialogFragment.kt:257)
at com.nextcloud.talk.conversation.CreateConversationDialogFragment$addParticipants$1.invoke (CreateConversationDialogFragment.kt:248)
at com.nextcloud.talk.conversation.CreateConversationDialogFragment$sam$androidx_lifecycle_Observer$0.onChanged
at androidx.lifecycle.LiveData.considerNotify (LiveData.java:133)
at androidx.lifecycle.LiveData.dispatchingValue (LiveData.java:151)
at androidx.lifecycle.LiveData.setValue (LiveData.java:309)
at androidx.lifecycle.MutableLiveData.setValue (MutableLiveData.java:50)
at androidx.lifecycle.LiveData$1.run (LiveData.java:93)
at android.os.Handler.handleCallback (Handler.java:958)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:230)
at android.os.Looper.loop (Looper.java:319)
at android.app.ActivityThread.main (ActivityThread.java:8893)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
NPE without this fix:
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4975)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:5008)
at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:54)
at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2386)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:210)
at android.os.Looper.loop (Looper.java:299)
at android.app.ActivityThread.main (ActivityThread.java:8252)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:954)
Caused by java.lang.NullPointerException:
at com.nextcloud.talk.conversationlist.ConversationsListActivity.onResume (ConversationsListActivity.kt:287)
at android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1565)
at android.app.Activity.performResume (Activity.java:8668)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4965)
The root cause may be that the CapabilitiesWorker is not finished so the serverVersion was not added to the user.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-03-19 15:49:38.476 15732-17089 okhttp.OkHttpClient com.nextcloud.talk2 I {"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":[]}}
2024-03-19 15:49:38.476 15732-17089 okhttp.OkHttpClient com.nextcloud.talk2 I <-- END HTTP (74-byte body)
2024-03-19 15:49:38.571 15732-15732 ViewRootIm...tActivity] com.nextcloud.talk2 I handleAppVisibility mAppVisible = false visible = true
2024-03-19 15:49:38.571 15732-15732 ViewRootIm...tActivity] com.nextcloud.talk2 I stopped(false) old = true
2024-03-19 15:49:38.571 15732-15732 ViewRootIm...tActivity] com.nextcloud.talk2 I WindowStopped on com.nextcloud.talk2/com.nextcloud.talk.chat.ChatActivity set to false
2024-03-19 15:49:38.695 15732-16333 WebSocketInstance com.nextcloud.talk2 D Receiving : okhttp3.internal.ws.RealWebSocket@b8eb9d5 {"type":"event","event":{"target":"room","type":"leave","leave":["01s9v73eeKC5P2QUmsEqfsi_ZmY-DaDPhs3wdFTmJkB8VzVJc1FSWUV5bVZVTEtBaVpZOUYxaDVMRlpsaG95enlFc2dXMXpQY3Y3dGNGNlNfemZiLXg5cXk1ZVNyTEkzNS0wcDZJZUdnelFYbmF6ZVMwcWRDbVBTNklLYkFHNUdwRDQ2c0VZR1RoX1JObmF2Q3hSb2YtbFNJOFRONkhFLWp2cWZBZnk2d2VSb1BsbG96VE90Vm45bFhOa2NwWWZfdTA1clJ4VFoxcHpJcHwyMjEzNTgwMTcx"]}}
2024-03-19 15:49:38.697 15732-15732 AndroidRuntime com.nextcloud.talk2 D Shutting down VM
2024-03-19 15:49:38.702 15732-15732 AndroidRuntime com.nextcloud.talk2 E FATAL EXCEPTION: main
Process: com.nextcloud.talk2, PID: 15732
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441)
at java.util.HashMap$EntryIterator.next(HashMap.java:1475)
at java.util.HashMap$EntryIterator.next(HashMap.java:1473)
at com.nextcloud.talk.chat.ChatActivity.sendStopTypingMessage(ChatActivity.kt:2097)
at com.nextcloud.talk.chat.ChatActivity.updateOwnTypingStatus(ChatActivity.kt:2063)
at com.nextcloud.talk.chat.ChatActivity$initMessageInputView$1.onTextChanged(ChatActivity.kt:1162)
at android.widget.TextView.sendOnTextChanged(TextView.java:11881)
at android.widget.TextView.setText(TextView.java:6968)
at android.widget.TextView.setText(TextView.java:6751)
at android.widget.EditText.setText(EditText.java:133)
at android.widget.TextView.setText(TextView.java:6703)
at com.nextcloud.talk.chat.ChatActivity.onStart(ChatActivity.kt:575)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1510)
at android.app.Activity.performStart(Activity.java:8616)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:4204)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
2024-03-19 15:49:38.735 15732-15732 Process com.nextcloud.talk2 I Sending signal. PID: 15732 SIG: 9
2024-03-19 15:49:39.328 1477-1521 WindowManager system_server E win=Window{9280569 u0 com.nextcloud.talk2/com.nextcloud.talk.activities.CallActivity EXITING} destroySurfaces: appStopped=false cleanupOnResume=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:6539 com.android.server.wm.ActivityRecord.destroySurfaces:6520 com.android.server.wm.WindowState.onExitAnimationDone:5995 com.android.server.wm.ActivityRecord$$ExternalSyntheticLambda10.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.ActivityRecord.onAnimationFinished:8607 com.android.server.wm.ActivityRecord.postApplyAnimation:6252
2024-03-19 15:49:40.075 19752-19752 nativeloader com.nextcloud.talk2 D Configuring classloader-namespace for other apk /data/app/~~7lbTYxiIqB-jrG8FI6_p4A==/com.nextcloud.talk2-0R1zH5b8yl__vfC9tvSYrg==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~7lbTYxiIqB-jrG8FI6_p4A==/com.nextcloud.talk2-0R1zH5b8yl__vfC9tvSYrg==/lib/arm64:/data/app/~~7lbTYxiIqB-jrG8FI6_p4A==/com.nextcloud.talk2-0R1zH5b8yl__vfC9tvSYrg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.nextcloud.talk2
2024-03-19 15:49:40.097 19752-19752 GraphicsEnvironment com.nextcloud.talk2 V ANGLE Developer option for 'com.nextcloud.talk2' set to: 'default'
2024-03-19 15:49:40.098 19752-19752 GraphicsEnvironment com.nextcloud.talk2 V ANGLE GameManagerService for com.nextcloud.talk2: false
2024-03-19 15:49:40.099 19752-19752 GraphicsEnvironment com.nextcloud.talk2
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>