Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2021-11-18 16:29:29 +0300
committerStefan Niedermann <info@niedermann.it>2021-11-18 16:29:29 +0300
commita4e84b960db78cf3ab441e4c40affcdcac5c0cdc (patch)
tree9d05c40e0dc4f2139a3b80d071a86d5d77881d03 /app/src/main
parent5bf2cf83ad5f5ce5f825731373cafaf7ac22f8f1 (diff)
Catch SSO 0.6.0 - Files 3.17 issue
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/exception/tips/TipsAdapter.java18
-rw-r--r--app/src/main/res/values/strings.xml3
2 files changed, 14 insertions, 7 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/exception/tips/TipsAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/exception/tips/TipsAdapter.java
index 6d0c3ff5e..5588c12dc 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/exception/tips/TipsAdapter.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/exception/tips/TipsAdapter.java
@@ -79,7 +79,8 @@ public class TipsAdapter extends RecyclerView.Adapter<TipsViewHolder> {
add(R.string.error_dialog_tip_clear_storage_might_help);
add(R.string.error_dialog_tip_clear_storage, INTENT_APP_INFO);
} else if (throwable instanceof NextcloudFilesAppNotSupportedException) {
- add(R.string.error_dialog_tip_files_outdated);
+ add(R.string.error_dialog_min_version, new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.nextcloud.client"))
+ .putExtra(INTENT_EXTRA_BUTTON_TEXT, R.string.error_action_update_files_app));
} else if (throwable instanceof OfflineException) {
add(R.string.error_dialog_tip_offline);
add(R.string.error_dialog_tip_sync_only_on_wifi);
@@ -169,12 +170,17 @@ public class TipsAdapter extends RecyclerView.Adapter<TipsViewHolder> {
add(R.string.error_dialog_tip_clear_storage, INTENT_APP_INFO);
}
} else if (throwable instanceof UnknownErrorException) {
- if (account != null) {
- add(R.string.error_dialog_unknown_error, new Intent(Intent.ACTION_VIEW)
- .putExtra(INTENT_EXTRA_BUTTON_TEXT, R.string.error_action_open_in_browser)
- .setData(Uri.parse(account.getUrl())));
+ if ("com.nextcloud.android.sso.QueryParam".equals(throwable.getMessage())) {
+ add(R.string.error_dialog_min_version, new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.nextcloud.client"))
+ .putExtra(INTENT_EXTRA_BUTTON_TEXT, R.string.error_action_update_files_app));
} else {
- add(R.string.error_dialog_unknown_error);
+ if (account != null) {
+ add(R.string.error_dialog_unknown_error, new Intent(Intent.ACTION_VIEW)
+ .putExtra(INTENT_EXTRA_BUTTON_TEXT, R.string.error_action_open_in_browser)
+ .setData(Uri.parse(account.getUrl())));
+ } else {
+ add(R.string.error_dialog_unknown_error);
+ }
}
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0cf2eb534..57e865856 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -239,7 +239,6 @@
<string name="error_dialog_tip_clear_storage_might_help">If the issue persists, try to clear the storage of both apps: Nextcloud and Nextcloud Deck to solve this issue.</string>
<string name="error_dialog_tip_database_upgrade_failed">The upgrade of the database failed. Please report the issue and clear the storage to use the app normally.</string>
<string name="error_dialog_tip_clear_storage">You can clear the storage by opening the app info and selecting Storage → Clear storage.</string>
- <string name="error_dialog_tip_files_outdated">Your Nextcloud app seems to be outdated. Please visit the Play Store or F-Droid to get the latest version.</string>
<string name="error_dialog_tip_offline">It looks like you tried to trigger a synchronization without an internet connection.</string>
<string name="error_dialog_tip_sync_only_on_wifi">If you have enabled the "Sync only on Wi-Fi" setting, you can only synchronize when you are connected to a Wi-Fi.</string>
<string name="error_dialog_tip_files_force_stop">Something seems to be wrong with your Nextcloud app. Please try to force stop both, the Nextcloud app and the Nextcloud Deck app.</string>
@@ -260,6 +259,7 @@
<string name="error_dialog_certificate">Something seems to be wrong with the certificate of the server. Please check all the accounts in the Nextcloud app for further information.</string>
<string name="error_dialog_tip_disable_battery_optimizations">Please disable all battery optimizations for Nextcloud and the Deck app.</string>
<string name="error_dialog_unknown_error">Your Nextcloud instance seems to be not reachable. Please check your internet connection and whether you are able to connect to your instance via browser.</string>
+ <string name="error_dialog_min_version">The Deck Android app requires the Nextcloud Android app to be at least version 3.18.</string>
<string name="error_action_open_deck_info">Open App info</string>
<string name="error_action_open_nextcloud_app">Open Nextcloud app</string>
<string name="error_action_open_network">Network settings</string>
@@ -267,6 +267,7 @@
<string name="error_action_open_in_browser">Open in browser</string>
<string name="error_action_install">Install</string>
<string name="error_action_report_issue">Report</string>
+ <string name="error_action_update_files_app">Update</string>
<string name="info_box_maintenance_mode">Server is in maintenance mode</string>
<string name="info_box_version_not_supported">Server version %1$s not supported, please update to %2$s</string>
<string name="share_link">Share link</string>