From 2723cd28711f5a2eeebcf66e8d89f84174e813be Mon Sep 17 00:00:00 2001 From: Alejandro Date: Fri, 17 Nov 2023 12:44:04 -0300 Subject: [PATCH] - Adds android:largeHeap="true" on manifest - Prioritize order where networkStateFlow is instantiated - Delete tools tag on xml where it was crashing --- .../main/activitymain/src/main/AndroidManifest.xml | 1 + .../sphinx/src/main/AndroidManifest.xml | 1 + .../layout/layout_message_type_attachment_file.xml | 3 +-- .../src/main/res/layout/fragment_chat_contact.xml | 3 +-- .../chat/sphinx/dashboard/ui/DashboardViewModel.kt | 14 +++++++------- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sphinx/activity/main/activitymain/src/main/AndroidManifest.xml b/sphinx/activity/main/activitymain/src/main/AndroidManifest.xml index 015b80232a..194fd160c2 100644 --- a/sphinx/activity/main/activitymain/src/main/AndroidManifest.xml +++ b/sphinx/activity/main/activitymain/src/main/AndroidManifest.xml @@ -12,6 +12,7 @@ android:theme="@style/AppLaunchTheme" android:configChanges="orientation|keyboardHidden|screenSize" android:screenOrientation="portrait" + android:largeHeap="true" android:windowSoftInputMode="adjustPan"> diff --git a/sphinx/application/sphinx/src/main/AndroidManifest.xml b/sphinx/application/sphinx/src/main/AndroidManifest.xml index 4dfc7be173..512f021518 100644 --- a/sphinx/application/sphinx/src/main/AndroidManifest.xml +++ b/sphinx/application/sphinx/src/main/AndroidManifest.xml @@ -13,6 +13,7 @@ android:label="@string/app_name" android:resizeableActivity="false" android:roundIcon="@mipmap/ic_launcher_round" + android:largeHeap="true" tools:replace="android:allowBackup" tools:targetApi="n" /> diff --git a/sphinx/screens/chats/chat-common/chat-common/src/main/res/layout/layout_message_type_attachment_file.xml b/sphinx/screens/chats/chat-common/chat-common/src/main/res/layout/layout_message_type_attachment_file.xml index f57e376076..1853ae8c32 100644 --- a/sphinx/screens/chats/chat-common/chat-common/src/main/res/layout/layout_message_type_attachment_file.xml +++ b/sphinx/screens/chats/chat-common/chat-common/src/main/res/layout/layout_message_type_attachment_file.xml @@ -100,8 +100,7 @@ app:layout_constraintBottom_toBottomOf="@id/button_attachment_file_download" app:layout_constraintEnd_toEndOf="@id/button_attachment_file_download" app:layout_constraintStart_toStartOf="@id/button_attachment_file_download" - app:layout_constraintTop_toTopOf="@id/button_attachment_file_download" - tools:visibility="visible" /> + app:layout_constraintTop_toTopOf="@id/button_attachment_file_download" /> diff --git a/sphinx/screens/chats/chat-contact/chat-contact/src/main/res/layout/fragment_chat_contact.xml b/sphinx/screens/chats/chat-contact/chat-contact/src/main/res/layout/fragment_chat_contact.xml index 3ba19f623f..2a33328d4b 100644 --- a/sphinx/screens/chats/chat-contact/chat-contact/src/main/res/layout/fragment_chat_contact.xml +++ b/sphinx/screens/chats/chat-contact/chat-contact/src/main/res/layout/fragment_chat_contact.xml @@ -124,8 +124,7 @@ + layout="@layout/layout_selected_message"/> , Boolean>> by lazy { + MutableStateFlow(Pair(LoadResponse.Loading, true)) + } + val networkStateFlow: StateFlow, Boolean>> + get() = _networkStateFlow.asStateFlow() + + private lateinit var signerManager: SignerManager init { @@ -1031,10 +1038,6 @@ internal class DashboardViewModel @Inject constructor( } } - private val _networkStateFlow: MutableStateFlow, Boolean>> by lazy { - MutableStateFlow(Pair(LoadResponse.Loading, true)) - } - private val _restoreProgressStateFlow: MutableStateFlow by lazy { MutableStateFlow(null) } @@ -1049,9 +1052,6 @@ internal class DashboardViewModel @Inject constructor( } } - val networkStateFlow: StateFlow, Boolean>> - get() = _networkStateFlow.asStateFlow() - val restoreProgressStateFlow: StateFlow get() = _restoreProgressStateFlow.asStateFlow()