Skip to content

Commit

Permalink
fix: fixed feed title not showing on first open (#564)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Kalderstam <jonas@cowboyprogrammer.org>
  • Loading branch information
spacecowboy authored Jan 28, 2025
1 parent 85fbb65 commit 25776f4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import com.nononsenseapps.feeder.ui.compose.utils.ImmutableHolder
import com.nononsenseapps.feeder.ui.compose.utils.ScreenType
import com.nononsenseapps.feeder.ui.compose.utils.onKeyEventLikeEscape
import com.nononsenseapps.feeder.util.ActivityLauncher
import com.nononsenseapps.feeder.util.FilePathProvider
import com.nononsenseapps.feeder.util.unicodeWrap
import org.kodein.di.compose.LocalDI
import org.kodein.di.instance
Expand Down Expand Up @@ -392,8 +391,6 @@ fun ArticleContent(
articleListState: LazyListState,
modifier: Modifier = Modifier,
) {
val filePathProvider by LocalDI.current.instance<FilePathProvider>()

val toolbarColor = MaterialTheme.colorScheme.surface.toArgb()

val context = LocalContext.current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class ArticleViewModel(
articleTitle = article?.title ?: "",
showToolbarMenu = toolbarVisible,
feedDisplayTitle = article?.feedDisplayTitle ?: "",
isBookmarked = article?.bookmarked ?: false,
isBookmarked = article?.bookmarked == true,
wordCount =
if (isFullText) {
article?.wordCountFull ?: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inline fun WithBidiDeterminedLayoutDirection(
Bidi(paragraph, Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT)
}

val content = remember { movableContentOf { content() } }
val content = remember(paragraph) { movableContentOf { content() } }

if (bidi.baseIsLeftToRight()) {
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Ltr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fun WithTooltipIfNotBlank(
modifier: Modifier = Modifier,
content: @Composable () -> Unit,
) {
val content = remember { movableContentOf { content() } }
val content = remember(tooltip) { movableContentOf { content() } }
if (tooltip.isNotBlank()) {
PlainTooltipBox(modifier = modifier, tooltip = { Text(tooltip) }) {
content()
Expand Down

0 comments on commit 25776f4

Please sign in to comment.