Skip to content

Commit

Permalink
Hide Fab when synchronizing in TimelineTab
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinokuni committed Aug 18, 2024
1 parent 14af99c commit c54a14e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ class TimelineScreenModel(
emptyFlow()
},
isAccountLocal = currentAccount!!.isLocal,
scrollToTop = true
scrollToTop = true,
hideReadAllFAB = !currentAccount!!.config.canMarkAllItemsAsRead
)
}

Expand Down Expand Up @@ -175,7 +176,10 @@ class TimelineScreenModel(

if (!currentAccount!!.isLocal) {
_timelineState.update {
it.copy(isRefreshing = true)
it.copy(
isRefreshing = true,
hideReadAllFAB = true
)
}
}

Expand Down Expand Up @@ -216,7 +220,6 @@ class TimelineScreenModel(
_timelineState.update {
it.copy(
isRefreshing = true,
hideReadAllFAB = true,
currentFeed = workInfo.progress.getString(SyncWorker.FEED_NAME_KEY)
?: "",
feedCount = workInfo.progress.getInt(SyncWorker.FEED_COUNT_KEY, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ data class AccountConfig(
val canUpdateFolder: Boolean = true,
val canUpdateFeed: Boolean = true,
val canDeleteFeed: Boolean = true,
val canDeleteFolder: Boolean = true
val canDeleteFolder: Boolean = true,
val canMarkAllItemsAsRead: Boolean = true
) {

companion object {
Expand All @@ -18,7 +19,6 @@ data class AccountConfig(
canCreateFolder = true,
addNoFolder = true,
useSeparateState = false,

)

val NEXTCLOUD_NEWS = AccountConfig(
Expand All @@ -44,7 +44,8 @@ data class AccountConfig(
canUpdateFolder = false,
canUpdateFeed = false,
canDeleteFeed = false,
canDeleteFolder = false
canDeleteFolder = false,
canMarkAllItemsAsRead = false
)
}
}

0 comments on commit c54a14e

Please sign in to comment.