mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
Added offline check in handleHttpExceptions in ConversationsListActivity
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
8571a25f99
commit
9f9fd1a82e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user