Skip to content

Commit

Permalink
Added offline check in handleHttpExceptions in ConversationsListActivity
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
  • Loading branch information
rapterjet2004 committed Feb 7, 2025
1 parent 40bcf74 commit 4cba1a0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -2020,7 +2022,6 @@ class ConversationsListActivity :
private fun onMessageSearchError(throwable: Throwable) {
handleHttpExceptions(throwable)
binding.swipeRefreshLayoutView?.isRefreshing = false
showErrorDialog()
}

fun updateFilterState(mention: Boolean, unread: Boolean) {
Expand Down

0 comments on commit 4cba1a0

Please sign in to comment.