From 05300682c1a6fc3d29a92fda521bc7c6bdcf6cf4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 13 Dec 2020 15:41:00 +0100 Subject: [PATCH] Fixes --- app/build.gradle | 4 +- .../metadata/android/en-US/changelogs/31.txt | 13 +++++++ .../metadata/android/en-US/changelogs/31.txt | 16 ++++++++ .../app/fedilab/fedilabtube/MainActivity.java | 38 +++++++++---------- 4 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 app/src/fdroid_acad/fastlane/metadata/android/en-US/changelogs/31.txt create mode 100644 app/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/31.txt diff --git a/app/build.gradle b/app/build.gradle index 4802424..41714f2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { minSdkVersion 21 targetSdkVersion 30 - versionCode 30 - versionName "1.10.0" + versionCode 31 + versionName "1.10.1" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/fdroid_acad/fastlane/metadata/android/en-US/changelogs/31.txt b/app/src/fdroid_acad/fastlane/metadata/android/en-US/changelogs/31.txt new file mode 100644 index 0000000..10a338e --- /dev/null +++ b/app/src/fdroid_acad/fastlane/metadata/android/en-US/changelogs/31.txt @@ -0,0 +1,13 @@ +Fixes some issues on 1.10.0 (Crashes when adding a playlist + bad behavior when subscribing to remote account) + +Added: +- Chromecast support (default disabled) +- Detect start time in URLs + +Fixed: +- Typo +- Comment feature when logged out +- Full-screen breaks +- Crashes with the download button on live streams +- Jumps with full-screen and vertical videos +- Abuse report notifications clickable \ No newline at end of file diff --git a/app/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/31.txt b/app/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/31.txt new file mode 100644 index 0000000..b3b0049 --- /dev/null +++ b/app/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/31.txt @@ -0,0 +1,16 @@ +Fixes some issues on 1.10.0 (Crashes when adding a playlist + bad behavior when subscribing to remote account) +Added: +- Chromecast support (default disabled) +- Detect start time in URLs + +Changed: +- Instance picker supports URLs + +Fixed: +- Typo +- Comment feature when logged out +- Full-screen breaks +- Crashes with the download button on live streams +- Jumps with full-screen and vertical videos +- Abuse report notifications clickable +- Remote channel subscriptions need twice clicks \ No newline at end of file diff --git a/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java b/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java index 62a798b..487083b 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java @@ -416,7 +416,6 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen setTitleCustom(R.string.title_discover); if (Helper.isLoggedIn(MainActivity.this)) { - navView.inflateMenu(R.menu.bottom_nav_menu_connected); refreshToken(); @@ -566,25 +565,7 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen oauthParams.setAccess_token(account.getToken()); try { Token token = new RetrofitPeertubeAPI(MainActivity.this).manageToken(oauthParams); - if (token == null && Helper.instanceOnline(instance)) { - runOnUiThread(() -> { - AlertDialog.Builder alt_bld = new AlertDialog.Builder(this); - alt_bld.setTitle(R.string.refresh_token_failed); - alt_bld.setMessage(R.string.refresh_token_failed_message); - alt_bld.setNegativeButton(R.string.action_logout, (dialog, id) -> { - dialog.dismiss(); - Helper.logoutCurrentUser(MainActivity.this, finalAccount); - }); - alt_bld.setPositiveButton(R.string._retry, (dialog, id) -> { - dialog.dismiss(); - refreshToken(); - }); - AlertDialog alert = alt_bld.create(); - alert.show(); - - }); - return; - } else if (token == null) { + if (token == null) { return; } runOnUiThread(() -> { @@ -622,7 +603,22 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen } instanceConfig = new RetrofitPeertubeAPI(MainActivity.this).getConfigInstance(); } catch (Error error) { - runOnUiThread(() -> Helper.logoutCurrentUser(MainActivity.this, finalAccount)); + runOnUiThread(() -> { + AlertDialog.Builder alt_bld = new AlertDialog.Builder(this); + alt_bld.setTitle(R.string.refresh_token_failed); + alt_bld.setMessage(R.string.refresh_token_failed_message); + alt_bld.setNegativeButton(R.string.action_logout, (dialog, id) -> { + dialog.dismiss(); + Helper.logoutCurrentUser(MainActivity.this, finalAccount); + }); + alt_bld.setPositiveButton(R.string._retry, (dialog, id) -> { + dialog.dismiss(); + refreshToken(); + }); + AlertDialog alert = alt_bld.create(); + alert.show(); + + }); error.printStackTrace(); } }