Skip to content

Commit

Permalink
Fix show back button when clicking on tagged user (#1579)
Browse files Browse the repository at this point in the history
* 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.

* Remove default nulls from PersonProfileScreen constructor

---------

Co-authored-by: Maarten Vercruysse <[email protected]>
  • Loading branch information
Tyoda and MV-GH authored Jul 9, 2024
1 parent e653f10 commit 90571ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/com/jerboa/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ class MainActivity : AppCompatActivity() {
markAsReadOnScroll = appSettings.markAsReadOnScroll,
postActionBarMode = appSettings.postActionBarMode.toEnum(),
swipeToActionPreset = appSettings.swipeToActionPreset.toEnum(),
padding = null,
)
}

Expand Down Expand Up @@ -362,9 +363,11 @@ 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(),
padding = null,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 90571ec

Please sign in to comment.