1
0
mirror of https://github.com/etesync/android synced 2024-12-22 14:48:11 +00:00

Sync errors: better handle Unauthorized and PermissionDenied errors.

We now open the account settings instead of the debug activity.
This commit is contained in:
Tom Hacohen 2020-11-08 17:41:30 +02:00
parent 9fd370ff6e
commit 4b6ce9ac5d

View File

@ -129,6 +129,8 @@ class SyncNotification(internal val context: Context, internal val notificationT
val detailsIntent: Intent
if (e is Exceptions.UnauthorizedException) {
detailsIntent = Intent(this, AccountSettingsActivity::class.java)
} else if (e is PermissionDeniedException || e is UnauthorizedException) {
detailsIntent = Intent(this, AccountSettingsActivity::class.java)
} else if (e is Exceptions.UserInactiveException) {
WebViewActivity.openUrl(this, Constants.dashboard)
return