currentConversation was not yet initialized in ChatActivity.
In the future this may be better handled via StateFlows. For now it's solved via arguments.
Without the fix, this NPE appeared:
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4768)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4801)
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:2215)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:346)
at android.os.Looper.loop (Looper.java:475)
at android.app.ActivityThread.main (ActivityThread.java:7889)
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:1009)
Caused by java.lang.NullPointerException:
at com.nextcloud.talk.chat.MessageInputFragment.onResume (MessageInputFragment.kt:146)
at androidx.fragment.app.Fragment.performResume (Fragment.java:3180)
at androidx.fragment.app.FragmentStateManager.resume (FragmentStateManager.java:606)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:285)
at androidx.fragment.app.FragmentStore.moveToExpectedState (FragmentStore.java:113)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1433)
at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2977)
at androidx.fragment.app.FragmentManager.dispatchResume (FragmentManager.java:2909)
at androidx.fragment.app.FragmentController.dispatchResume (FragmentController.java:285)
at androidx.fragment.app.FragmentActivity.onResumeFragments (FragmentActivity.java:334)
at androidx.fragment.app.FragmentActivity.onPostResume (FragmentActivity.java:323)
at androidx.appcompat.app.AppCompatActivity.onPostResume (AppCompatActivity.java:245)
at android.app.Activity.performResume (Activity.java:8215)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4758)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
For archived conversations, require "-v2".
This is done because on server api, "archived-conversations" was already released for 20.0.2 by mistake which should have only be done for 20.1
As it's planned to release android talk 20.0.3 with a fresh master state, the archived conversations feature must be hidden manually, This is done by required "-v2".
Either it's served as this in the future or it can be removed for the 20.1.0 release.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
only more complex checks should be made in CapabilitiesUtil, just checking a capability should be done directly via hasSpreedFeatureCapability
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>