mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-02-20 21:44:45 +01:00
Fix infinite refresh when admin messages list is empty (#1587)
This commit is contained in:
parent
e7550f7a43
commit
4c8d9c8f7f
@ -620,6 +620,8 @@ class DashboardPresenter @Inject constructor(
|
||||
|
||||
if (dashboardItem is DashboardItem.AdminMessages && !dashboardItem.isDataLoaded) {
|
||||
dashboardItemsToLoad = dashboardItemsToLoad - DashboardItem.Type.ADMIN_MESSAGE
|
||||
dashboardTileLoadedList = dashboardTileLoadedList - DashboardItem.Tile.ADMIN_MESSAGE
|
||||
|
||||
dashboardItemLoadedList.removeAll { it.type == DashboardItem.Type.ADMIN_MESSAGE }
|
||||
}
|
||||
|
||||
@ -654,9 +656,12 @@ class DashboardPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun updateForceRefreshData(dashboardItem: DashboardItem) {
|
||||
val isNotLoadedAdminMessage =
|
||||
dashboardItem is DashboardItem.AdminMessages && !dashboardItem.isDataLoaded
|
||||
|
||||
with(dashboardItemRefreshLoadedList) {
|
||||
removeAll { it.type == dashboardItem.type }
|
||||
add(dashboardItem)
|
||||
if (!isNotLoadedAdminMessage) add(dashboardItem)
|
||||
}
|
||||
|
||||
val isRefreshItemLoaded =
|
||||
|
Loading…
x
Reference in New Issue
Block a user