From 969f78e7c9d2b83b1382bbbfa168f935d245c602 Mon Sep 17 00:00:00 2001 From: Sven Jacobs Date: Sun, 9 Jun 2024 21:15:03 +0200 Subject: [PATCH] chore: fix formatting --- .../feeder/archmodel/Repository.kt | 44 +++++++++---------- .../feeder/ui/compose/feed/FeedScreen.kt | 8 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) 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 {