Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
svenjacobs committed Jun 9, 2024
1 parent a76bbd1 commit 969f78e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
44 changes: 22 additions & 22 deletions app/src/main/java/com/nononsenseapps/feeder/archmodel/Repository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}
Expand All @@ -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,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 969f78e

Please sign in to comment.