From 74a4efc9d3c456c6a5963d8d6d8d89706433712a Mon Sep 17 00:00:00 2001 From: Tyoda Date: Mon, 8 Jul 2024 19:47:49 +0200 Subject: [PATCH 1/2] Fix show back button when clicking on tagged user Previously a non-working menu button would show in the top left corner when going to a user profile through a user tag (e.g. @Tyoda@lemm.ee). Now a working go back button is shown instead. --- app/src/main/java/com/jerboa/MainActivity.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/jerboa/MainActivity.kt b/app/src/main/java/com/jerboa/MainActivity.kt index bf68a999e..5488c992d 100644 --- a/app/src/main/java/com/jerboa/MainActivity.kt +++ b/app/src/main/java/com/jerboa/MainActivity.kt @@ -362,6 +362,7 @@ class MainActivity : AppCompatActivity() { blurNSFW = appSettings.blurNSFW.toEnum(), showPostLinkPreviews = appSettings.showPostLinkPreviews, drawerState = drawerState, + onBack = appState::popBackStack, markAsReadOnScroll = appSettings.markAsReadOnScroll, postActionBarMode = appSettings.postActionBarMode.toEnum(), swipeToActionPreset = appSettings.swipeToActionPreset.toEnum(), From 88060758b6c6187ac562b42ca9b40a7b7bd3802f Mon Sep 17 00:00:00 2001 From: Tyoda Date: Mon, 8 Jul 2024 20:39:41 +0200 Subject: [PATCH 2/2] Remove default nulls from PersonProfileScreen constructor --- app/src/main/java/com/jerboa/MainActivity.kt | 2 ++ .../java/com/jerboa/ui/components/home/BottomNavScreen.kt | 2 ++ .../com/jerboa/ui/components/person/PersonProfileScreen.kt | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/jerboa/MainActivity.kt b/app/src/main/java/com/jerboa/MainActivity.kt index 5488c992d..563506fdc 100644 --- a/app/src/main/java/com/jerboa/MainActivity.kt +++ b/app/src/main/java/com/jerboa/MainActivity.kt @@ -327,6 +327,7 @@ class MainActivity : AppCompatActivity() { markAsReadOnScroll = appSettings.markAsReadOnScroll, postActionBarMode = appSettings.postActionBarMode.toEnum(), swipeToActionPreset = appSettings.swipeToActionPreset.toEnum(), + padding = null, ) } @@ -366,6 +367,7 @@ class MainActivity : AppCompatActivity() { markAsReadOnScroll = appSettings.markAsReadOnScroll, postActionBarMode = appSettings.postActionBarMode.toEnum(), swipeToActionPreset = appSettings.swipeToActionPreset.toEnum(), + padding = null, ) } diff --git a/app/src/main/java/com/jerboa/ui/components/home/BottomNavScreen.kt b/app/src/main/java/com/jerboa/ui/components/home/BottomNavScreen.kt index ddd4176a9..094515d88 100644 --- a/app/src/main/java/com/jerboa/ui/components/home/BottomNavScreen.kt +++ b/app/src/main/java/com/jerboa/ui/components/home/BottomNavScreen.kt @@ -329,6 +329,7 @@ fun BottomNavScreen( blurNSFW = appSettings.blurNSFW.toEnum(), showPostLinkPreviews = appSettings.showPostLinkPreviews, drawerState = drawerState, + onBack = null, markAsReadOnScroll = appSettings.markAsReadOnScroll, postActionBarMode = appSettings.postActionBarMode.toEnum(), swipeToActionPreset = appSettings.swipeToActionPreset.toEnum(), @@ -350,6 +351,7 @@ fun BottomNavScreen( blurNSFW = appSettings.blurNSFW.toEnum(), showPostLinkPreviews = appSettings.showPostLinkPreviews, drawerState = drawerState, + onBack = null, markAsReadOnScroll = appSettings.markAsReadOnScroll, postActionBarMode = appSettings.postActionBarMode.toEnum(), swipeToActionPreset = appSettings.swipeToActionPreset.toEnum(), diff --git a/app/src/main/java/com/jerboa/ui/components/person/PersonProfileScreen.kt b/app/src/main/java/com/jerboa/ui/components/person/PersonProfileScreen.kt index 010e82fb8..6ab15fa67 100644 --- a/app/src/main/java/com/jerboa/ui/components/person/PersonProfileScreen.kt +++ b/app/src/main/java/com/jerboa/ui/components/person/PersonProfileScreen.kt @@ -119,9 +119,9 @@ fun PersonProfileScreen( drawerState: DrawerState, markAsReadOnScroll: Boolean, postActionBarMode: PostActionBarMode, - onBack: (() -> Unit)? = null, + onBack: (() -> Unit)?, swipeToActionPreset: SwipeToActionPreset, - padding: PaddingValues? = null, + padding: PaddingValues?, ) { Log.d("jerboa", "got to person screen")