Skip to content

Commit

Permalink
fix(ui): RTL walkaround
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Feb 13, 2024
1 parent a481bc9 commit 5e0b420
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package me.ash.reader.ui.component.menu

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.core.tween
import androidx.compose.animation.expandVertically
Expand Down Expand Up @@ -427,7 +428,7 @@ fun DropdownMenuContent(
animationSpec = tween(
delayMillis = ExitDuration - FadeOutDuration,
durationMillis = FadeOutDuration,
easing = EmphasizedAccelerate
easing = LinearEasing
)
), modifier = Modifier
) {
Expand Down Expand Up @@ -456,7 +457,7 @@ fun DropdownMenuContent(
), exit = fadeOut(
animationSpec = tween(
// Why ???
durationMillis = ExitDuration - 40,
durationMillis = ExitDuration - 20,
easing = EmphasizedAccelerate
)
) + shrinkVertically(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ fun SwipeableArticleItem(
expanded = expanded,
onDismissRequest = { expanded = false },
offset = density.run {
DpOffset(menuOffset.x.toDp(), 0.dp)
if (LocalLayoutDirection.current == LayoutDirection.Ltr)
DpOffset(menuOffset.x.toDp(), 0.dp)
else DpOffset(0.dp, 0.dp)
},
) {
ArticleItemMenuContent(
Expand Down

0 comments on commit 5e0b420

Please sign in to comment.