Add support for v2/instance (#4062)

…with fallback to v1
This commit is contained in:
Levi Bard 2023-10-25 12:53:10 +02:00 committed by GitHub
commit 131ebabe85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 344 additions and 142 deletions

View file

@ -40,3 +40,5 @@ fun Throwable.getErrorString(context: Context): String = getServerErrorMessage()
is IOException -> context.getString(R.string.error_network)
else -> context.getString(R.string.error_generic)
}
fun Throwable.isHttpNotFound(): Boolean = (this as? HttpException)?.code() == 404