Disable error dialog for admin messages (#2165)

This commit is contained in:
Rafał Borcz 2023-04-06 10:13:34 +02:00 committed by GitHub
parent 8752607433
commit bce2c39ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -606,7 +606,7 @@ class DashboardPresenter @Inject constructor(
} }
is Resource.Error -> { is Resource.Error -> {
Timber.i("Loading dashboard admin message result: An exception occurred") Timber.i("Loading dashboard admin message result: An exception occurred")
errorHandler.dispatch(it.error) Timber.e(it.error)
updateData( updateData(
dashboardItem = DashboardItem.AdminMessages( dashboardItem = DashboardItem.AdminMessages(
adminMessage = null, adminMessage = null,
@ -748,7 +748,7 @@ class DashboardPresenter @Inject constructor(
itemsLoadedList.find { it.type == DashboardItem.Type.ACCOUNT }?.error != null itemsLoadedList.find { it.type == DashboardItem.Type.ACCOUNT }?.error != null
val isGeneralError = val isGeneralError =
filteredItems.none { it.error == null } && filteredItems.isNotEmpty() || isAccountItemError filteredItems.none { it.error == null } && filteredItems.isNotEmpty() || isAccountItemError
val firstError = itemsLoadedList.mapNotNull { it.error }.firstOrNull() val firstError = itemsLoadedList.firstNotNullOfOrNull { it.error }
val filteredOriginalLoadedList = val filteredOriginalLoadedList =
dashboardItemLoadedList.filterNot { it.type == DashboardItem.Type.ACCOUNT } dashboardItemLoadedList.filterNot { it.type == DashboardItem.Type.ACCOUNT }