Added offline check in handleHttpExceptions in ConversationsListActivity

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
rapterjet2004 2025-02-07 11:02:47 -06:00 committed by Marcel Hibbe
parent 8571a25f99
commit 9f9fd1a82e
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -1055,6 +1055,8 @@ class ConversationsListActivity :
}
private fun handleHttpExceptions(throwable: Throwable) {
if (!networkMonitor.isOnline.value) return
if (throwable is HttpException) {
when (throwable.code()) {
HTTP_UNAUTHORIZED -> showUnauthorizedDialog()
@ -2020,7 +2022,6 @@ class ConversationsListActivity :
private fun onMessageSearchError(throwable: Throwable) {
handleHttpExceptions(throwable)
binding.swipeRefreshLayoutView?.isRefreshing = false
showErrorDialog()
}
fun updateFilterState(mention: Boolean, unread: Boolean) {