feat: implement toasts for authentication errors
This commit is contained in:
parent
d92e4b0daf
commit
c8a2c1dc19
@ -206,15 +206,17 @@ class CloudConnectionListPresenter @Inject constructor( //
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
AuthorizationResult.ACCESS_DENIED -> //TODO: Add proper handling for denied grants.
|
AuthorizationResult.ACCESS_DENIED -> {
|
||||||
Log.d("pCloud", "Account access denied")
|
Timber.tag("CloudConnListPresenter").e("Account access denied")
|
||||||
|
view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(R.string.cloud_names_pcloud)))
|
||||||
|
}
|
||||||
AuthorizationResult.AUTH_ERROR -> {
|
AuthorizationResult.AUTH_ERROR -> {
|
||||||
//TODO: Add error handling.
|
Timber.tag("CloudConnListPresenter").e("""Account access grant error: ${authData.errorMessage}""".trimIndent())
|
||||||
Log.d("pCloud", """Account access grant error: ${authData.errorMessage}""".trimIndent())
|
view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(R.string.cloud_names_pcloud)))
|
||||||
}
|
}
|
||||||
AuthorizationResult.CANCELLED -> {
|
AuthorizationResult.CANCELLED -> {
|
||||||
//TODO: Handle cancellation.
|
Timber.tag("CloudConnListPresenter").i("Account access grant cancelled")
|
||||||
Log.d("pCloud", "Account access grant cancelled:")
|
view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(R.string.cloud_names_pcloud)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user