this was temporarily disabled as a workaround because of https://github.com/nextcloud/talk-android/issues/3146
So after screen rotation it could happen that chat was not updated.
Now that the issue is solved, portrait mode will be allowed again
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
handleActionFromContact was not executed in onCreate of the MainActivity which is now fixed by this commit.
+ refactoring some intent handling
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
com.nextcloud.talk2 E Failed to searchContactsByPhoneNumber
java.lang.NullPointerException: Parameter specified as non-null is null: method com.nextcloud.talk.models.json.search.ContactsByNumberOCS.setMap, parameter <set-?>
at com.nextcloud.talk.models.json.search.ContactsByNumberOCS.setMap(Unknown Source:2)
at com.nextcloud.talk.models.json.search.ContactsByNumberOCS$$JsonObjectMapper.parseField(ContactsByNumberOCS$$JsonObjectMapper.java:56)
at com.nextcloud.talk.models.json.search.ContactsByNumberOCS$$JsonObjectMapper.parse(ContactsByNumberOCS$$JsonObjectMapper.java:33)
at com.nextcloud.talk.models.json.search.ContactsByNumberOCS$$JsonObjectMapper.parse(ContactsByNumberOCS$$JsonObjectMapper.java:16)
at com.nextcloud.talk.models.json.search.ContactsByNumberOverall$$JsonObjectMapper.parseField(ContactsByNumberOverall$$JsonObjectMapper.java:40)
at com.nextcloud.talk.models.json.search.ContactsByNumberOverall$$JsonObjectMapper.parse(ContactsByNumberOverall$$JsonObjectMapper.java:30)
at com.nextcloud.talk.models.json.search.ContactsByNumberOverall$$JsonObjectMapper.parse(ContactsByNumberOverall$$JsonObjectMapper.java:13)
at com.bluelinelabs.logansquare.JsonMapper.parse(JsonMapper.java:52)
at com.bluelinelabs.logansquare.LoganSquare.parse(LoganSquare.java:69)
at com.github.aurae.retrofit2.LoganSquareResponseBodyConverter.convert(LoganSquareResponseBodyConverter.java:30)
at com.github.aurae.retrofit2.LoganSquareResponseBodyConverter.convert(LoganSquareResponseBodyConverter.java:16)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:243)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46)
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:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Exception java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.AppCompat (or a descendant).
at com.google.android.material.internal.ThemeEnforcement.checkTheme (ThemeEnforcement.java:247)
at com.google.android.material.internal.ThemeEnforcement.checkAppCompatTheme (ThemeEnforcement.java:212)
at com.google.android.material.internal.ThemeEnforcement.checkCompatibleTheme (ThemeEnforcement.java:147)
at com.google.android.material.internal.ThemeEnforcement.obtainTintedStyledAttributes (ThemeEnforcement.java:114)
at com.google.android.material.textfield.TextInputLayout.<init> (TextInputLayout.java:472)
at com.google.android.material.textfield.TextInputLayout.<init> (TextInputLayout.java:451)
at com.google.android.material.textfield.TextInputLayout.<init> (TextInputLayout.java:447)
at com.nextcloud.talk.settings.SettingsActivity.askForPhoneNumber (SettingsActivity.kt:935)
at com.nextcloud.talk.settings.SettingsActivity.access$askForPhoneNumber (SettingsActivity.kt:105)
at com.nextcloud.talk.settings.SettingsActivity$checkForPhoneNumber$1.onNext (SettingsActivity.kt:915)
at com.nextcloud.talk.settings.SettingsActivity$checkForPhoneNumber$1.onNext (SettingsActivity.kt:908)
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:211)
at android.os.Looper.loop (Looper.java:300)
at android.app.ActivityThread.main (ActivityThread.java:8294)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1028)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
without this fix, it could happen that pullChatMessagesPending remains true after the conversation screen was in background. As a result the check
if (pullChatMessagesPending) {
Log.d(TAG, "pullChatMessages - pullChatMessagesPending is true, exiting")
return
}
in pullChatMessages() always returns without to pull chat messages (so there was even no long-polling anymore).
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
without this fix:
after login the conversation list opened multiple times for the same user when other users already exist
reason:
proceedWithLogin() in AccountVerificationController is called multiple times because for ALL accounts (for (User user : userEntityObjectList)) the workers send their results via eventBus to
AccountVerificationController#onMessageEvent(eventStatus: EventStatus)
So depending on how many accounts exist, the ConversationList was loaded x times.
solution:
if internalAccountId is already the active one, no need to load the conversationList another time.
when there is only one account -> currentUser id and internalAccountId are the same so it would not enter the condition. Thus also allowing it when only one user exists.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
otherwise the list in the ConversationListActivity would handle it which results in unexpected user actions dialog popup
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The parsed result was without quotes which resulted in error:
Unterminated object at character 21 of [{fromLabel=English (US),
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
sending too much data via intent always is a bad pattern which can lead to TransactionTooLargeException.
When OpenAI translation is enabled, the capabilities contain a ton of translation combinations. These capabilities are contained in 'currentUser' as well in 'selectedConversation'. So, TransactionTooLargeException was thrown.
this PR:
- avoids passing too much data as parcelables in intents (esp. conversation and user)
- introduces MVVM patterns to load required data (esp conversation) from backend (for now via requests, in the future from database first)
- introduces ConversationModel which is created out of the Conversation json model
- loads user data via injection when possible
- creates some quickfixes in ConversationBottomDialog, EntryMenuController and OperationsMenuController.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>