diff options
author | Stefan Niedermann <info@niedermann.it> | 2021-07-28 13:40:18 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2021-07-28 13:40:18 +0300 |
commit | 38c25f60e79c51adada5d3c1c2416de9ac6771a5 (patch) | |
tree | 17c0366db50cfe9cf5983af81ddbac2773dceb53 /app/src/main | |
parent | c4a92cadc055c4fcaf1c4ac713f679dda9f137bc (diff) |
Display infrastructure related issues only on pull2refresh
- https://github.com/stefan-niedermann/nextcloud-deck/issues/1061
- https://github.com/stefan-niedermann/nextcloud-deck/issues/1063
https://github.com/stefan-niedermann/nextcloud-deck/issues/1064
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java index b65069d69..5f8fda81b 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java @@ -48,6 +48,7 @@ import com.google.android.material.tabs.TabLayoutMediator; import com.nextcloud.android.sso.AccountImporter; import com.nextcloud.android.sso.exceptions.AccountImportCancelledException; import com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException; +import com.nextcloud.android.sso.exceptions.UnknownErrorException; import com.nextcloud.android.sso.helper.SingleAccountHelper; import java.net.HttpURLConnection; @@ -983,7 +984,9 @@ public class MainActivity extends AppCompatActivity implements DeleteStackListen public void onError(Throwable throwable) { super.onError(throwable); if (throwable.getClass() == OfflineException.class || throwable instanceof OfflineException) { - DeckLog.error("Do not show synchronization failed snackbar because it is an ", OfflineException.class.getSimpleName(), "- assuming the user has wi-fi disabled but \"Sync only on wi-fi\" enabled"); + DeckLog.error("Do not show sync failed snackbar because it is an ", OfflineException.class.getSimpleName(), "- assuming the user has wi-fi disabled but \"Sync only on wi-fi\" enabled"); + } else if (throwable.getClass() == UnknownErrorException.class || throwable instanceof UnknownErrorException) { + DeckLog.error("Do not show sync failed snackbar because it is an ", UnknownErrorException.class.getSimpleName(), "- assuming a not reachable server or infrastructure issues"); } else { showSyncFailedSnackbar(throwable); } |