fix crash in AccountListFragment

This commit is contained in:
Conny Duck 2024-05-09 08:50:03 +02:00
parent 05c7e7b806
commit cdb8c327b1
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,7 @@ import com.keylesspalace.tusky.util.startActivityWithSlideInAnimation
import com.keylesspalace.tusky.util.viewBinding
import com.keylesspalace.tusky.view.EndlessOnScrollListener
import javax.inject.Inject
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.launch
import retrofit2.Response
@ -330,6 +331,9 @@ class AccountListFragment :
val linkHeader = response.headers()["Link"]
onFetchAccountsSuccess(accountList, linkHeader)
} catch (exception: Exception) {
if (exception is CancellationException) {
throw exception
}
onFetchAccountsFailure(exception)
}
}