Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues caused by edge to edge #1443

Merged
merged 2 commits into from Mar 11, 2024
Merged

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Mar 10, 2024

I guess we didn't need edge to edge. Causes too much problems atm

Fixes #1436
Fixes #1441
Fixes #1439
Fixes #1437

@MV-GH MV-GH requested a review from dessalines as a code owner March 10, 2024 18:43
@@ -238,7 +236,7 @@ fun BottomNavActivity(
)
}
},
) { _ ->
) { padding ->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was need to propagate the padding of the navigation bar (ours) else content hides behind it. We can't use the previous approach that applies it to the navhost, that causes weird issues

@@ -308,6 +311,7 @@ fun BottomNavActivity(
siteViewModel = siteViewModel,
drawerState = drawerState,
blurNSFW = appSettings.blurNSFW.toEnum(),
padding = padding,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit annoying, at some point I'll see if I can lift this all out of this nested navhost and just have a single one

@@ -2,6 +2,7 @@
<resources>

<style name="Theme.Jerboa" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowTranslucentStatus">true</item>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i don't do this, it applies the status bar padding twice, this could have also been due to the nested scaffold.

val baseModifier = if (padding == null) {
Modifier
} else {
// https://issuetracker.google.com/issues/249727298
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using edge to edge, it also applies the navigationbar padding above the IME

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and everything seems to work well, thx.

@dessalines dessalines merged commit 9c8a378 into LemmyNet:main Mar 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants