Commit 3f1af73b authored by Thomas's avatar Thomas
Browse files

avoid a crash with old peertube instances

parent 9683fee1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ import android.webkit.URLUtil;
import androidx.documentfile.provider.DocumentFile;
import androidx.preference.PreferenceManager;

import com.google.gson.JsonSyntaxException;

import org.jetbrains.annotations.NotNull;
import org.json.JSONException;
import org.json.JSONObject;
@@ -1188,9 +1190,9 @@ public class RetrofitPeertubeAPI {
                }
                throw error;
            }
        } catch (IOException e) {
        } catch (IOException | JsonSyntaxException e) {
            Error error = new Error();
            error.setError(_context.getString(R.string.toast_error));
            error.setError(_context.getString(R.string.toast_error_peertube_not_supported));
            apiResponse.setError(error);
            e.printStackTrace();
        }
+0 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="compose_shortcut_short_label1">Compose</string>
</resources>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -2228,4 +2228,7 @@
    <string name="action_change_subscribed_language">Change subscribed languages</string>
    <string name="filter_languages">Filter languages</string>
    <string name="translate_in">Translate in</string>

    <string name="compose_shortcut_short_label1">Compose</string>
    <string name="toast_error_peertube_not_supported">Your Peertube is too old and cannot be supported by the app.</string>
</resources>
 No newline at end of file