depending on amount of participants, voiceOnly call and enabled/disabled own video, the contents of PIP windows are updated.
This will be further improved when speaker-view is implemented.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
For now, instead to measure height mixed from xml and compose, assume a fixed height for the xml views (callInfosLinearLayout and callControls) to limit the grid height.
They is not a nice solution and should be replaced once everything is migrated to compose.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
SSLSocketFactoryCompat relies on SSLContext.getInstance("TLS"), which is
called from componentApplication.inject(this) in NextcloudTalkApplication
.onCreate() - before Conscrypt is set as the provider.
This caused issues on Android 7.0 devices when connecting to Nextcloud's
push notification server. The result was a handshake error, because
Android 7.0's native implementation only supports TLSv1.2 and the
secp256r1 group, while the server supports only secp384r1.
Setting Conscrypt as a provider earlier ensures that the native
implementation is not used and the connection completes successfully.
Call stack:
<init>:44, SSLSocketFactoryCompat (com.nextcloud.talk.utils.ssl)
provideSslSocketFactoryCompat:156, RestModule (com.nextcloud.talk.dagger.modules)
provideSslSocketFactoryCompat:56, RestModule_ProvideSslSocketFactoryCompatFactory (com.nextcloud.talk.dagger.modules)
get:46, RestModule_ProvideSslSocketFactoryCompatFactory (com.nextcloud.talk.dagger.modules)
get:14, RestModule_ProvideSslSocketFactoryCompatFactory (com.nextcloud.talk.dagger.modules)
getSynchronized:54, DoubleCheck (dagger.internal)
get:45, DoubleCheck (dagger.internal)
get:69, RestModule_ProvideHttpClientFactory (com.nextcloud.talk.dagger.modules)
get:19, RestModule_ProvideHttpClientFactory (com.nextcloud.talk.dagger.modules)
getSynchronized:54, DoubleCheck (dagger.internal)
get:45, DoubleCheck (dagger.internal)
injectNextcloudTalkApplication:1393, DaggerNextcloudTalkApplicationComponent$NextcloudTalkApplicationComponentImpl (com.nextcloud.talk.application)
inject:867, DaggerNextcloudTalkApplicationComponent$NextcloudTalkApplicationComponentImpl (com.nextcloud.talk.application)
onCreate:145, NextcloudTalkApplication (com.nextcloud.talk.application)
Signed-off-by: Viktor Balogh <viktor.balogh45@gmail.com>
- Updated api with getContextForChatMessages
- Added ContextChatCompose for viewing the context of messages
- Added ComposeChatAdapter, a reimplementation of chat adapter
- Helper functions
- Added new date header
- Added a better Shimmer
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
There were crash reports for:
Exception java.lang.RuntimeException:
...
Caused by com.nextcloud.talk.utils.NoSupportedApiException:
at com.nextcloud.talk.utils.ApiUtils.getConversationApiVersion (ApiUtils.kt:134)
at com.nextcloud.talk.contacts.ContactsRepositoryImpl.<init> (ContactsRepositoryImpl.kt:28)
This could happen because of missing capabilities for user and should be fixed.
As a fallback, API v4 is guessed
Adding this as comment in the code as the root cause must be found..
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
For v21.0.0, the following crash was reported:
Exception java.lang.NullPointerException: null cannot be cast to non-null type com.nextcloud.talk.chat.data.model.ChatMessage
at com.nextcloud.talk.chat.ChatActivity.onLoadMore (ChatActivity.kt:3107)
at com.stfalcon.chatkit.messages.MessagesListAdapter.onLoadMore (MessagesListAdapter.java:148)
at com.stfalcon.chatkit.messages.RecyclerScrollMoreListener.onScrolled (RecyclerScrollMoreListener.java:82)
at androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled (RecyclerView.java:5688)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep3 (RecyclerView.java:4741)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout (RecyclerView.java:4367)
at androidx.recyclerview.widget.RecyclerView.onLayout (RecyclerView.java:4919)
This is now improved:
- lastOrNull prevents exceptions if no matching item is found
- as? is a safe cast that returns null if the cast fails
Whole expression becomes null-safe, and id will be null if anything along the way doesn't match. Only when not null, onLoadMore continues.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
to be discussed: does it make sense to show a dialog instead? At least when it's created via 1:1 conversation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
snackbars disaapear with the switch to a different screen. Toasts survive the switch so they are visible during the activities switch
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
switch video capture for calls between 4:3 and 16:9 ratio depending on portrait/landscape mode
Also: simplify placement of self video view (it was buggy) as well as applying the ratio there as well
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The new photo picker does not need files permission. For other features, the permissions are already checked elsewhere
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
for ConversationInfoActivity, the old ContactsActivity was still used to add participants. This is now replaced by the ContactsActivityCompose, so ContactsActivity is now deleted
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
SetStatusBarColor() was called outside of the MaterialTheme() block
Also, "surface" has to be used to get the 'light primary color'
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
... as "components" package should be used for jetpack compose components that can be shared for multiple screens
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- Most code removed from ChatActivity
- Most work in MediaPlayerManager
- Added BackgroundVoiceMessageCard
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
A NPE was reported for ConversationsListActivity.kt:537
Adapter is accessed with !! while it is not safe to access in term of lifecycle.
So there could have been a race condition.
The overall problem is not solved and may even have to wait for migration to Compose.
This is just a quickfix for v21.0.0
Reported crash was :
Exception java.lang.NullPointerException:
at com.nextcloud.talk.conversationlist.ConversationsListActivity.filterConversation (ConversationsListActivity.kt:537)
at com.nextcloud.talk.conversationlist.ConversationsListActivity.setConversationList (ConversationsListActivity.kt:472)
at com.nextcloud.talk.conversationlist.ConversationsListActivity.access$setConversationList (ConversationsListActivity.kt:158)
at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invokeSuspend (ConversationsListActivity.kt:398)
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)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:219)
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$2.emit (Errors.kt:154)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:220)
at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl (SharedFlow.kt:392)
at kotlinx.coroutines.flow.SharedFlowImpl.collect (Unknown Source)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect (SafeCollector.common.kt:112)
at kotlinx.coroutines.flow.FlowKt__ErrorsKt.catchImpl (Errors.kt:152)
at kotlinx.coroutines.flow.FlowKt.catchImpl (Unknown Source:1)
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect (SafeCollector.common.kt:112)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect (SafeCollector.common.kt:112)
at kotlinx.coroutines.flow.FlowKt__CollectKt.collect (Collect.kt:26)
at kotlinx.coroutines.flow.FlowKt.collect (Unknown Source:1)
at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5.invokeSuspend (ConversationsListActivity.kt:399)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith (DispatchedContinuation.kt:363)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable (Cancellable.kt:26)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default (Cancellable.kt:21)
at kotlinx.coroutines.CoroutineStart.invoke (CoroutineStart.kt:88)
at kotlinx.coroutines.AbstractCoroutine.start (AbstractCoroutine.kt:123)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch (Builders.common.kt:52)
at kotlinx.coroutines.BuildersKt.launch (Unknown Source:1)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default (Builders.common.kt:43)
at kotlinx.coroutines.BuildersKt.launch$default (Unknown Source:1)
at com.nextcloud.talk.conversationlist.ConversationsListActivity.initObservers (ConversationsListActivity.kt:395)
at com.nextcloud.talk.conversationlist.ConversationsListActivity.onCreate (ConversationsListActivity.kt:261)
at android.app.Activity.performCreate (Activity.java:9149)
at android.app.Activity.performCreate (Activity.java:9127)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1526)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4152)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4361)
at android.app.ActivityThread.handleRelaunchActivityInner (ActivityThread.java:6446)
at android.app.ActivityThread.handleRelaunchActivity (ActivityThread.java:6329)
at android.app.servertransaction.ActivityRelaunchItem.execute (ActivityRelaunchItem.java:82)
at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:60)
at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem (TransactionExecutor.java:174)
at android.app.servertransaction.TransactionExecutor.executeTransactionItems (TransactionExecutor.java:109)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:81)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2747)
at android.os.Handler.dispatchMessage (Handler.java:112)
at android.os.Looper.loopOnce (Looper.java:268)
at android.os.Looper.loop (Looper.java:384)
at android.app.ActivityThread.main (ActivityThread.java:8921)
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:907)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>