diff --git a/app/src/main/java/com/nononsenseapps/feeder/archmodel/Repository.kt b/app/src/main/java/com/nononsenseapps/feeder/archmodel/Repository.kt index a3b725fc8..c8db96401 100644 --- a/app/src/main/java/com/nononsenseapps/feeder/archmodel/Repository.kt +++ b/app/src/main/java/com/nononsenseapps/feeder/archmodel/Repository.kt @@ -422,18 +422,18 @@ class Repository(override val di: DI) : DIAware { ) = getUnreadCount(feedId).mapLatest { unreadCount -> ScreenTitle( title = - when { - feedId > ID_UNSET -> feedStore.getDisplayTitle(feedId) - tag.isNotBlank() -> tag - else -> null - }, + when { + feedId > ID_UNSET -> feedStore.getDisplayTitle(feedId) + tag.isNotBlank() -> tag + else -> null + }, type = - when (feedId) { - ID_UNSET -> FeedType.TAG - ID_ALL_FEEDS -> FeedType.ALL_FEEDS - ID_SAVED_ARTICLES -> FeedType.SAVED_ARTICLES - else -> FeedType.FEED - }, + when (feedId) { + ID_UNSET -> FeedType.TAG + ID_ALL_FEEDS -> FeedType.ALL_FEEDS + ID_SAVED_ARTICLES -> FeedType.SAVED_ARTICLES + else -> FeedType.FEED + }, unreadCount = unreadCount, ) } @@ -444,18 +444,18 @@ class Repository(override val di: DI) : DIAware { getUnreadCount(feedId).mapLatest { unreadCount -> ScreenTitle( title = - when { - feedId > ID_UNSET -> feedStore.getDisplayTitle(feedId) - tag.isNotBlank() -> tag - else -> null - }, + when { + feedId > ID_UNSET -> feedStore.getDisplayTitle(feedId) + tag.isNotBlank() -> tag + else -> null + }, type = - when (feedId) { - ID_UNSET -> FeedType.TAG - ID_ALL_FEEDS -> FeedType.ALL_FEEDS - ID_SAVED_ARTICLES -> FeedType.SAVED_ARTICLES - else -> FeedType.FEED - }, + when (feedId) { + ID_UNSET -> FeedType.TAG + ID_ALL_FEEDS -> FeedType.ALL_FEEDS + ID_SAVED_ARTICLES -> FeedType.SAVED_ARTICLES + else -> FeedType.FEED + }, unreadCount = unreadCount, ) } diff --git a/app/src/main/java/com/nononsenseapps/feeder/ui/compose/feed/FeedScreen.kt b/app/src/main/java/com/nononsenseapps/feeder/ui/compose/feed/FeedScreen.kt index 7d7360eb2..9e90e7370 100644 --- a/app/src/main/java/com/nononsenseapps/feeder/ui/compose/feed/FeedScreen.kt +++ b/app/src/main/java/com/nononsenseapps/feeder/ui/compose/feed/FeedScreen.kt @@ -1000,10 +1000,10 @@ fun FeedScreen( FeedType.SAVED_ARTICLES -> stringResource(id = R.string.saved_articles) FeedType.ALL_FEEDS -> stringResource(id = R.string.all_feeds) }.let { title -> - if (viewState.feedScreenTitle.type == FeedType.SAVED_ARTICLES - || !viewState.showTitleUnreadCount - || viewState.feedScreenTitle.unreadCount == 0 - || title == null + if (viewState.feedScreenTitle.type == FeedType.SAVED_ARTICLES || + !viewState.showTitleUnreadCount || + viewState.feedScreenTitle.unreadCount == 0 || + title == null ) { title } else {