mirror of https://github.com/readrops/Readrops.git
Hide Fab when synchronizing in TimelineTab
This commit is contained in:
parent
14af99c8df
commit
c54a14e616
|
@ -146,7 +146,8 @@ class TimelineScreenModel(
|
||||||
emptyFlow()
|
emptyFlow()
|
||||||
},
|
},
|
||||||
isAccountLocal = currentAccount!!.isLocal,
|
isAccountLocal = currentAccount!!.isLocal,
|
||||||
scrollToTop = true
|
scrollToTop = true,
|
||||||
|
hideReadAllFAB = !currentAccount!!.config.canMarkAllItemsAsRead
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +176,10 @@ class TimelineScreenModel(
|
||||||
|
|
||||||
if (!currentAccount!!.isLocal) {
|
if (!currentAccount!!.isLocal) {
|
||||||
_timelineState.update {
|
_timelineState.update {
|
||||||
it.copy(isRefreshing = true)
|
it.copy(
|
||||||
|
isRefreshing = true,
|
||||||
|
hideReadAllFAB = true
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +220,6 @@ class TimelineScreenModel(
|
||||||
_timelineState.update {
|
_timelineState.update {
|
||||||
it.copy(
|
it.copy(
|
||||||
isRefreshing = true,
|
isRefreshing = true,
|
||||||
hideReadAllFAB = true,
|
|
||||||
currentFeed = workInfo.progress.getString(SyncWorker.FEED_NAME_KEY)
|
currentFeed = workInfo.progress.getString(SyncWorker.FEED_NAME_KEY)
|
||||||
?: "",
|
?: "",
|
||||||
feedCount = workInfo.progress.getInt(SyncWorker.FEED_COUNT_KEY, 0),
|
feedCount = workInfo.progress.getInt(SyncWorker.FEED_COUNT_KEY, 0),
|
||||||
|
|
|
@ -9,7 +9,8 @@ data class AccountConfig(
|
||||||
val canUpdateFolder: Boolean = true,
|
val canUpdateFolder: Boolean = true,
|
||||||
val canUpdateFeed: Boolean = true,
|
val canUpdateFeed: Boolean = true,
|
||||||
val canDeleteFeed: Boolean = true,
|
val canDeleteFeed: Boolean = true,
|
||||||
val canDeleteFolder: Boolean = true
|
val canDeleteFolder: Boolean = true,
|
||||||
|
val canMarkAllItemsAsRead: Boolean = true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -18,7 +19,6 @@ data class AccountConfig(
|
||||||
canCreateFolder = true,
|
canCreateFolder = true,
|
||||||
addNoFolder = true,
|
addNoFolder = true,
|
||||||
useSeparateState = false,
|
useSeparateState = false,
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
val NEXTCLOUD_NEWS = AccountConfig(
|
val NEXTCLOUD_NEWS = AccountConfig(
|
||||||
|
@ -44,7 +44,8 @@ data class AccountConfig(
|
||||||
canUpdateFolder = false,
|
canUpdateFolder = false,
|
||||||
canUpdateFeed = false,
|
canUpdateFeed = false,
|
||||||
canDeleteFeed = false,
|
canDeleteFeed = false,
|
||||||
canDeleteFolder = false
|
canDeleteFolder = false,
|
||||||
|
canMarkAllItemsAsRead = false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue