diff --git a/app/src/main/java/org/thoughtcrime/securesms/main/MainFloatingActionButtons.kt b/app/src/main/java/org/thoughtcrime/securesms/main/MainFloatingActionButtons.kt index 5a9b744845..8282d0b9fa 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/main/MainFloatingActionButtons.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/main/MainFloatingActionButtons.kt @@ -137,7 +137,7 @@ private fun BoxScope.SecondaryActionButton( } AnimatedVisibility( - visible = destination == MainNavigationListLocation.CHATS, + visible = destination == MainNavigationListLocation.CHATS || destination == MainNavigationListLocation.ARCHIVE, modifier = Modifier.align(secondaryButtonAlignment), enter = slideInVertically(initialOffsetY = offsetYProvider), exit = slideOutVertically(targetOffsetY = offsetYProvider) @@ -170,7 +170,7 @@ private fun PrimaryActionButton( ) { val onClick = remember(destination) { when (destination) { - MainNavigationListLocation.ARCHIVE -> error("Not supported") + MainNavigationListLocation.ARCHIVE -> onNewChatClick MainNavigationListLocation.CHATS -> onNewChatClick MainNavigationListLocation.CALLS -> onNewCallClick MainNavigationListLocation.STORIES -> { @@ -185,7 +185,7 @@ private fun PrimaryActionButton( icon = { AnimatedContent(destination) { targetState -> val (icon, contentDescriptionId) = when (targetState) { - MainNavigationListLocation.ARCHIVE -> error("Not supported") + MainNavigationListLocation.ARCHIVE -> R.drawable.symbol_edit_24 to R.string.conversation_list_fragment__fab_content_description MainNavigationListLocation.CHATS -> R.drawable.symbol_edit_24 to R.string.conversation_list_fragment__fab_content_description MainNavigationListLocation.CALLS -> R.drawable.symbol_phone_plus_24 to R.string.CallLogFragment__start_a_new_call MainNavigationListLocation.STORIES -> R.drawable.symbol_camera_24 to R.string.conversation_list_fragment__open_camera_description diff --git a/app/src/main/java/org/thoughtcrime/securesms/main/MainNavigation.kt b/app/src/main/java/org/thoughtcrime/securesms/main/MainNavigation.kt index 3732c50274..f4cf4c0b47 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/main/MainNavigation.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/main/MainNavigation.kt @@ -230,8 +230,14 @@ fun MainNavigationRail( } } + val selectedDestination = if (state.currentListLocation == MainNavigationListLocation.ARCHIVE) { + MainNavigationListLocation.CHATS + } else { + state.currentListLocation + } + entries.forEachIndexed { idx, destination -> - val selected = state.currentListLocation == destination + val selected = selectedDestination == destination Box { NavigationRailItem( diff --git a/app/src/main/res/layout/stories_landing_fragment.xml b/app/src/main/res/layout/stories_landing_fragment.xml index 7885830288..2518773187 100644 --- a/app/src/main/res/layout/stories_landing_fragment.xml +++ b/app/src/main/res/layout/stories_landing_fragment.xml @@ -20,6 +20,7 @@ android:id="@+id/recycler" android:layout_width="match_parent" android:layout_height="0dp" + android:background="@color/signal_colorBackground" android:clipChildren="false" android:clipToPadding="false" app:layout_constraintBottom_toBottomOf="parent" @@ -50,6 +51,6 @@ android:layout_height="wrap_content" android:inflatedId="@+id/banner_compose_view" android:layout="@layout/conversation_list_banner_view" - app:layout_constraintTop_toTopOf="@id/recycler"/> + app:layout_constraintTop_toTopOf="@id/recycler" /> \ No newline at end of file