diff --git a/CHANGELOG.md b/CHANGELOG.md index e32781155..1f4b32d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + ### Changed + +- Compatibility updates for Android 15 & 16 - Calling now works directly without launching dialpad ([#562]) ## [1.5.0] - 2025-10-18 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8517ec8c3..13104cd46 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -144,6 +144,7 @@ dependencies { implementation(libs.mmslib) implementation(libs.androidx.swiperefreshlayout) implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.documentfile) implementation(libs.androidx.lifecycle.process) implementation(libs.ez.vcard) implementation(libs.kotlinx.serialization.json) diff --git a/app/detekt-baseline.xml b/app/detekt-baseline.xml index c68cc9307..156b30b3c 100644 --- a/app/detekt-baseline.xml +++ b/app/detekt-baseline.xml @@ -47,13 +47,6 @@ MagicNumber:ImageCompressor.kt$ImageCompressor$8 MagicNumber:ImageCompressor.kt$ImageCompressor$90f MagicNumber:MainActivity.kt$MainActivity$30 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$3 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$4 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$5 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$6 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$7 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$8 - MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.<no name provided>$9 MagicNumber:ScheduleMessageDialog.kt$ScheduleMessageDialog$23 MagicNumber:ScheduleMessageDialog.kt$ScheduleMessageDialog$5 MagicNumber:ScheduleMessageDialog.kt$ScheduleMessageDialog$59 @@ -134,6 +127,7 @@ MaxLineLength:SmsReceiver.kt$SmsReceiver$val participant = SimpleContact(0, 0, senderName, photoUri, arrayListOf(phoneNumber), ArrayList(), ArrayList()) MaxLineLength:SmsSender.kt$SmsSender$val intent = Intent(SendStatusReceiver.SMS_DELIVERED_ACTION, requestUri, app, SmsStatusDeliveredReceiver::class.java) MaxLineLength:SmsStatusDeliveredReceiver.kt$SmsStatusDeliveredReceiver$// TODO: Need to check whether SC still trying to deliver the SMS to destination and will send the report again? + MaxLineLength:ThreadActivity.kt$ThreadActivity$// check keyboard height just to be sure, 150 seems like a good middle ground between ime and navigation bar MaxLineLength:ThreadActivity.kt$ThreadActivity$// do not show the date/time above every message, only if the difference between the 2 messages is at least MIN_DATE_TIME_DIFF_SECS, MaxLineLength:ThreadActivity.kt$ThreadActivity$if MaxLineLength:ThreadActivity.kt$ThreadActivity$privateContacts.firstOrNull { it.doesHavePhoneNumber(participant.phoneNumbers.first().normalizedNumber) } @@ -149,7 +143,6 @@ MaxLineLength:VCard.kt$VCardPropertyWrapper.Companion$is Note -> VCardPropertyWrapper(value, context.getString(org.fossify.commons.R.string.notes), property) MaxLineLength:VCard.kt$VCardPropertyWrapper.Companion$is Telephone -> VCardPropertyWrapper(text.normalizePhoneNumber(), getPropertyTypeString(context), property) MaxLineLength:VCard.kt$VCardWrapper$data - MaxLineLength:VCardViewerActivity.kt$VCardViewerActivity$updateMaterialActivityViews(binding.vcardViewerCoordinator, binding.contactsList, useTransparentNavigation = true, useTopSearchMenu = false) MaxLineLength:VCardViewerAdapter.kt$VCardViewerAdapter.VCardPropertyViewHolder$inner NestedBlockDepth:AttachmentUtils.kt$AttachmentUtils$private fun readBody(parser: XmlPullParser): List<String> NestedBlockDepth:Context.kt$fun Context.getThreadParticipants( threadId: Long, contactsMap: HashMap<Int, SimpleContact>?, ): ArrayList<SimpleContact> diff --git a/app/lint-baseline.xml b/app/lint-baseline.xml index 2faad6041..3b2acad9a 100644 --- a/app/lint-baseline.xml +++ b/app/lint-baseline.xml @@ -23,17 +23,6 @@ column="20"/> - - - - @@ -80,13 +69,57 @@ + message="A newer version of androidx.room:room-compiler than 2.8.2 is available: 2.8.3" + errorLine1="room = "2.8.2"" + errorLine2=" ~~~~~~~"> + line="18" + column="8"/> + + + + + + + + + + + + + + + + @@ -1526,7 +1559,7 @@ errorLine2=" ~~~~~~~~"> @@ -1537,7 +1570,7 @@ errorLine2=" ~~~~~~~~"> @@ -1548,7 +1581,7 @@ errorLine2=" ~~~~~~~~"> @@ -1559,7 +1592,7 @@ errorLine2=" ~~~~~~~~"> @@ -1643,7 +1676,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -1693,12 +1726,12 @@ + message="The resource `R.dimen.pin_icon_size` appears to be unused" + errorLine1=" <dimen name="pin_icon_size">15dp</dimen>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> @@ -1812,17 +1845,6 @@ column="13"/> - - - - @@ -2193,7 +2215,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2204,7 +2226,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2215,30 +2237,30 @@ errorLine2=" ~~~~~~~~~"> + errorLine1=" <ImageView" + errorLine2=" ~~~~~~~~~"> + line="17" + column="6"/> + errorLine1=" <ImageView" + errorLine2=" ~~~~~~~~~"> + line="89" + column="6"/> @@ -2384,28 +2406,6 @@ column="13"/> - - - - - - - - + binding.mainMenu.requireToolbar().setOnMenuItemClickListener { menuItem -> when (menuItem.itemId) { R.id.show_recycle_bin -> launchRecycleBin() R.id.show_archived -> launchArchivedConversations() @@ -196,7 +189,7 @@ class MainActivity : SimpleActivity() { } private fun refreshMenuItems() { - binding.mainMenu.getToolbar().menu.apply { + binding.mainMenu.requireToolbar().menu.apply { findItem(R.id.show_recycle_bin).isVisible = config.useRecycleBin findItem(R.id.show_archived).isVisible = config.isArchiveAvailable } @@ -219,7 +212,6 @@ class MainActivity : SimpleActivity() { } private fun updateMenuColors() { - updateStatusbarColor(getProperBackgroundColor()) binding.mainMenu.updateColors() } diff --git a/app/src/main/kotlin/org/fossify/messages/activities/ManageBlockedKeywordsActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/ManageBlockedKeywordsActivity.kt index b172a87fc..e6acf45b7 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/ManageBlockedKeywordsActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/ManageBlockedKeywordsActivity.kt @@ -34,21 +34,15 @@ class ManageBlockedKeywordsActivity : SimpleActivity(), RefreshRecyclerViewListe private val binding by viewBinding(ActivityManageBlockedKeywordsBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { - isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(binding.root) updateBlockedKeywords() setupOptionsMenu() - updateMaterialActivityViews( - mainCoordinatorLayout = binding.blockKeywordsCoordinator, - nestedView = binding.manageBlockedKeywordsList, - useTransparentNavigation = true, - useTopSearchMenu = false - ) + setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.manageBlockedKeywordsList)) setupMaterialScrollListener( scrollingView = binding.manageBlockedKeywordsList, - toolbar = binding.blockKeywordsToolbar + topAppBar = binding.blockKeywordsAppbar ) updateTextColors(binding.manageBlockedKeywordsWrapper) @@ -63,7 +57,7 @@ class ManageBlockedKeywordsActivity : SimpleActivity(), RefreshRecyclerViewListe override fun onResume() { super.onResume() - setupToolbar(binding.blockKeywordsToolbar, NavigationIcon.Arrow) + setupTopAppBar(binding.blockKeywordsAppbar, NavigationIcon.Arrow) } private fun setupOptionsMenu() { diff --git a/app/src/main/kotlin/org/fossify/messages/activities/NewConversationActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/NewConversationActivity.kt index f02651783..1174abec4 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/NewConversationActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/NewConversationActivity.kt @@ -57,21 +57,15 @@ class NewConversationActivity : SimpleActivity() { private val binding by viewBinding(ActivityNewConversationBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { - isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(binding.root) title = getString(R.string.new_conversation) updateTextColors(binding.newConversationHolder) - updateMaterialActivityViews( - mainCoordinatorLayout = binding.newConversationCoordinator, - nestedView = binding.contactsList, - useTransparentNavigation = true, - useTopSearchMenu = false - ) + setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.contactsList)) setupMaterialScrollListener( scrollingView = binding.contactsList, - toolbar = binding.newConversationToolbar + topAppBar = binding.newConversationAppbar ) window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) @@ -85,7 +79,7 @@ class NewConversationActivity : SimpleActivity() { override fun onResume() { super.onResume() - setupToolbar(binding.newConversationToolbar, NavigationIcon.Arrow) + setupTopAppBar(binding.newConversationAppbar, NavigationIcon.Arrow) binding.noContactsPlaceholder2.setTextColor(getProperPrimaryColor()) binding.noContactsPlaceholder2.underlineText() binding.suggestionsLabel.setTextColor(getProperPrimaryColor()) diff --git a/app/src/main/kotlin/org/fossify/messages/activities/RecycleBinConversationsActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/RecycleBinConversationsActivity.kt index 59f9ba56a..d6407e47e 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/RecycleBinConversationsActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/RecycleBinConversationsActivity.kt @@ -7,7 +7,6 @@ import org.fossify.commons.dialogs.ConfirmationDialog import org.fossify.commons.extensions.areSystemAnimationsEnabled import org.fossify.commons.extensions.beGoneIf import org.fossify.commons.extensions.beVisibleIf -import org.fossify.commons.extensions.getProperBackgroundColor import org.fossify.commons.extensions.hideKeyboard import org.fossify.commons.extensions.viewBinding import org.fossify.commons.helpers.NavigationIcon @@ -33,20 +32,14 @@ class RecycleBinConversationsActivity : SimpleActivity() { @SuppressLint("InlinedApi") override fun onCreate(savedInstanceState: Bundle?) { - isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(binding.root) setupOptionsMenu() - updateMaterialActivityViews( - mainCoordinatorLayout = binding.recycleBinCoordinator, - nestedView = binding.conversationsList, - useTransparentNavigation = true, - useTopSearchMenu = false - ) + setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.conversationsList)) setupMaterialScrollListener( scrollingView = binding.conversationsList, - toolbar = binding.recycleBinToolbar + topAppBar = binding.recycleBinAppbar ) loadRecycleBinConversations() @@ -54,9 +47,7 @@ class RecycleBinConversationsActivity : SimpleActivity() { override fun onResume() { super.onResume() - setupToolbar(binding.recycleBinToolbar, NavigationIcon.Arrow) - updateMenuColors() - + setupTopAppBar(binding.recycleBinAppbar, NavigationIcon.Arrow) loadRecycleBinConversations() } @@ -82,10 +73,6 @@ class RecycleBinConversationsActivity : SimpleActivity() { } } - private fun updateMenuColors() { - updateStatusbarColor(getProperBackgroundColor()) - } - private fun loadRecycleBinConversations() { ensureBackgroundThread { val conversations = try { diff --git a/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt index bdaa27105..2b9040d09 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt @@ -85,25 +85,19 @@ class SettingsActivity : SimpleActivity() { private val binding by viewBinding(ActivitySettingsBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { - isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(binding.root) - updateMaterialActivityViews( - mainCoordinatorLayout = binding.settingsCoordinator, - nestedView = binding.settingsHolder, - useTransparentNavigation = true, - useTopSearchMenu = false - ) + setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.settingsNestedScrollview)) setupMaterialScrollListener( scrollingView = binding.settingsNestedScrollview, - toolbar = binding.settingsToolbar + topAppBar = binding.settingsAppbar ) } override fun onResume() { super.onResume() - setupToolbar(binding.settingsToolbar, NavigationIcon.Arrow) + setupTopAppBar(binding.settingsAppbar, NavigationIcon.Arrow) setupCustomizeColors() setupCustomizeNotifications() diff --git a/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt index 43a301f5e..0894e150c 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt @@ -45,7 +45,9 @@ import androidx.core.view.ViewCompat import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsAnimationCompat import androidx.core.view.WindowInsetsCompat +import androidx.core.view.doOnLayout import androidx.core.view.updateLayoutParams +import androidx.core.view.updatePadding import androidx.documentfile.provider.DocumentFile import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView @@ -74,6 +76,7 @@ import org.fossify.commons.extensions.getProperPrimaryColor import org.fossify.commons.extensions.getProperTextColor import org.fossify.commons.extensions.getTextSize import org.fossify.commons.extensions.hideKeyboard +import org.fossify.commons.extensions.insetsController import org.fossify.commons.extensions.isDynamicTheme import org.fossify.commons.extensions.isOrWasThankYouInstalled import org.fossify.commons.extensions.isVisible @@ -237,19 +240,18 @@ class ThreadActivity : SimpleActivity() { } override fun onCreate(savedInstanceState: Bundle?) { - isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(binding.root) setupOptionsMenu() refreshMenuItems() - - updateMaterialActivityViews( - mainCoordinatorLayout = binding.threadCoordinator, - nestedView = null, - useTransparentNavigation = false, - useTopSearchMenu = false + setupEdgeToEdge( + padBottomImeAndSystem = listOf( + binding.messageHolder.root, + binding.shortCodeHolder.root + ) ) - setupMaterialScrollListener(null, binding.threadToolbar) + setupMessagingEdgeToEdge() + setupMaterialScrollListener(null, binding.threadAppbar) val extras = intent.extras if (extras == null) { @@ -270,17 +272,16 @@ class ThreadActivity : SimpleActivity() { loadConversation() setupAttachmentPickerView() - setupKeyboardListener() hideAttachmentPicker() maybeSetupRecycleBinView() } override fun onResume() { super.onResume() - setupToolbar( - toolbar = binding.threadToolbar, - toolbarNavigationIcon = NavigationIcon.Arrow, - statusBarColor = getProperBackgroundColor() + setupTopAppBar( + topAppBar = binding.threadAppbar, + navigationIcon = NavigationIcon.Arrow, + topBarColor = getProperBackgroundColor() ) isActivityVisible = true @@ -310,7 +311,6 @@ class ThreadActivity : SimpleActivity() { val bottomBarColor = getBottomBarColor() binding.messageHolder.root.setBackgroundColor(bottomBarColor) binding.shortCodeHolder.root.setBackgroundColor(bottomBarColor) - updateNavigationBarColor(bottomBarColor) } override fun onPause() { @@ -325,12 +325,13 @@ class ThreadActivity : SimpleActivity() { saveDraftMessage() } - override fun onBackPressed() { + override fun onBackPressedCompat(): Boolean { isAttachmentPickerVisible = false - if (binding.messageHolder.attachmentPickerHolder.isVisible()) { + return if (binding.messageHolder.attachmentPickerHolder.isVisible()) { hideAttachmentPicker() + true } else { - super.onBackPressed() + false } } @@ -911,15 +912,16 @@ class ThreadActivity : SimpleActivity() { threadAddAttachment.setOnClickListener { if (attachmentPickerHolder.isVisible()) { isAttachmentPickerVisible = false - WindowCompat.getInsetsController(window, threadTypeMessage) + hideAttachmentPicker() + window.insetsController(binding.messageHolder.threadTypeMessage) .show(WindowInsetsCompat.Type.ime()) } else { isAttachmentPickerVisible = true - showOrHideAttachmentPicker() - WindowCompat.getInsetsController(window, threadTypeMessage) + showAttachmentPicker() + window.insetsController(binding.messageHolder.threadTypeMessage) .hide(WindowInsetsCompat.Type.ime()) } - window.decorView.requestApplyInsets() + binding.messageHolder.threadTypeMessage.requestApplyInsets() } if (intent.extras?.containsKey(THREAD_ATTACHMENT_URI) == true) { @@ -2060,52 +2062,35 @@ class ThreadActivity : SimpleActivity() { .start() } - private fun setupKeyboardListener() { - window.decorView.setOnApplyWindowInsetsListener { view, insets -> - showOrHideAttachmentPicker() - view.onApplyWindowInsets(insets) - } - - val callback = - object : WindowInsetsAnimationCompat.Callback(DISPATCH_MODE_CONTINUE_ON_SUBTREE) { - override fun onPrepare(animation: WindowInsetsAnimationCompat) { - super.onPrepare(animation) - showOrHideAttachmentPicker() - } - - override fun onProgress( - insets: WindowInsetsCompat, - runningAnimations: MutableList, - ) = insets - } - ViewCompat.setWindowInsetsAnimationCallback(window.decorView, callback) + private fun getBottomBarColor() = if (isDynamicTheme()) { + resources.getColor(org.fossify.commons.R.color.you_bottom_bar_color) + } else { + getBottomNavigationBackgroundColor() } - private fun showOrHideAttachmentPicker() { - val type = WindowInsetsCompat.Type.ime() - val insets = ViewCompat.getRootWindowInsets(window.decorView) ?: return - val isKeyboardVisible = insets.isVisible(type) - - if (isKeyboardVisible) { - val keyboardHeight = insets.getInsets(type).bottom - val bottomBarHeight = insets.getInsets(WindowInsetsCompat.Type.navigationBars()).bottom + fun setupMessagingEdgeToEdge() { + ViewCompat.setOnApplyWindowInsetsListener( + binding.messageHolder.threadTypeMessage + ) { view, insets -> + val type = WindowInsetsCompat.Type.ime() + val isKeyboardVisible = insets.isVisible(type) + if (isKeyboardVisible) { + val keyboardHeight = insets.getInsets(type).bottom + val bottomBarHeight = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom - // check keyboard height just to be sure, 150 seems like a good middle ground between ime and navigation bar - config.keyboardHeight = if (keyboardHeight > 150) { - keyboardHeight - bottomBarHeight - } else { - getDefaultKeyboardHeight() + // check keyboard height just to be sure, 150 seems like a good middle ground between ime and navigation bar + config.keyboardHeight = if (keyboardHeight > 150) { + keyboardHeight - bottomBarHeight + } else { + getDefaultKeyboardHeight() + } + hideAttachmentPicker() + } else if (isAttachmentPickerVisible) { + showAttachmentPicker() } - hideAttachmentPicker() - } else if (isAttachmentPickerVisible) { - showAttachmentPicker() - } - } - private fun getBottomBarColor() = if (isDynamicTheme()) { - resources.getColor(org.fossify.commons.R.color.you_bottom_bar_color) - } else { - getBottomNavigationBackgroundColor() + insets + } } companion object { diff --git a/app/src/main/kotlin/org/fossify/messages/activities/VCardViewerActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/VCardViewerActivity.kt index b06e91c06..e6df27e90 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/VCardViewerActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/VCardViewerActivity.kt @@ -24,12 +24,11 @@ class VCardViewerActivity : SimpleActivity() { private val binding by viewBinding(ActivityVcardViewerBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { - isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(binding.root) - updateMaterialActivityViews(binding.vcardViewerCoordinator, binding.contactsList, useTransparentNavigation = true, useTopSearchMenu = false) - setupMaterialScrollListener(binding.contactsList, binding.vcardToolbar) + setupEdgeToEdge(padBottomSystem = listOf(binding.contactsList)) + setupMaterialScrollListener(binding.contactsList, binding.vcardAppbar) val vCardUri = intent.getParcelableExtra(EXTRA_VCARD_URI) as? Uri if (vCardUri != null) { @@ -44,7 +43,7 @@ class VCardViewerActivity : SimpleActivity() { override fun onResume() { super.onResume() - setupToolbar(binding.vcardToolbar, NavigationIcon.Arrow) + setupTopAppBar(binding.vcardAppbar, NavigationIcon.Arrow) } private fun setupOptionsMenu(vCardUri: Uri) { diff --git a/app/src/main/kotlin/org/fossify/messages/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/org/fossify/messages/dialogs/MessageDetailsDialog.kt index 80eeb2f9f..1e1562a80 100644 --- a/app/src/main/kotlin/org/fossify/messages/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/org/fossify/messages/dialogs/MessageDetailsDialog.kt @@ -17,7 +17,7 @@ import org.joda.time.DateTime class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Message) : BasePropertiesDialog(activity) { init { @SuppressLint("MissingPermission") - val availableSIMs = activity.subscriptionManagerCompat().activeSubscriptionInfoList + val availableSIMs = activity.subscriptionManagerCompat().activeSubscriptionInfoList.orEmpty() addProperty(message.getSenderOrReceiverLabel(), message.getSenderOrReceiverPhoneNumbers()) if (availableSIMs.count() > 1) { diff --git a/app/src/main/kotlin/org/fossify/messages/receivers/DirectReplyReceiver.kt b/app/src/main/kotlin/org/fossify/messages/receivers/DirectReplyReceiver.kt index a8b116951..e11f3da85 100644 --- a/app/src/main/kotlin/org/fossify/messages/receivers/DirectReplyReceiver.kt +++ b/app/src/main/kotlin/org/fossify/messages/receivers/DirectReplyReceiver.kt @@ -30,7 +30,7 @@ class DirectReplyReceiver : BroadcastReceiver() { val availableSIMs = context.subscriptionManagerCompat().activeSubscriptionInfoList if ((availableSIMs?.size ?: 0) > 1) { val currentSIMCardIndex = context.config.getUseSIMIdAtNumber(address) - val wantedId = availableSIMs.getOrNull(currentSIMCardIndex) + val wantedId = availableSIMs?.getOrNull(currentSIMCardIndex) if (wantedId != null) { subscriptionId = wantedId.subscriptionId } diff --git a/app/src/main/res/layout/activity_archived_conversations.xml b/app/src/main/res/layout/activity_archived_conversations.xml index 29f509b4c..e4215221f 100644 --- a/app/src/main/res/layout/activity_archived_conversations.xml +++ b/app/src/main/res/layout/activity_archived_conversations.xml @@ -6,19 +6,25 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_height="wrap_content"> + + + + diff --git a/app/src/main/res/layout/activity_conversation_details.xml b/app/src/main/res/layout/activity_conversation_details.xml index e648dc32e..2fd787912 100644 --- a/app/src/main/res/layout/activity_conversation_details.xml +++ b/app/src/main/res/layout/activity_conversation_details.xml @@ -6,21 +6,28 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_height="wrap_content"> + + + + + android:scrollbars="none" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + android:layout_height="wrap_content"> + + + + + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + android:layout_height="wrap_content"> + + + + + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + android:layout_height="wrap_content"> + + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 045187c8c..40ec728d1 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -6,21 +6,28 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_height="wrap_content"> + + + + + android:scrollbars="none" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + android:layout_height="wrap_content"> + + + + + android:scrollbars="none" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + android:layout_height="wrap_content"> + + + + + app:layoutManager="org.fossify.commons.views.MyLinearLayoutManager" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> diff --git a/app/src/main/res/layout/layout_invalid_short_code_info.xml b/app/src/main/res/layout/layout_invalid_short_code_info.xml index 276ae7eee..fc6868c1a 100644 --- a/app/src/main/res/layout/layout_invalid_short_code_info.xml +++ b/app/src/main/res/layout/layout_invalid_short_code_info.xml @@ -2,13 +2,13 @@ + android:layout_height="wrap_content">