This commit is contained in:
Thomas 2020-12-13 15:41:00 +01:00
parent a3714a4ecf
commit 05300682c1
4 changed files with 48 additions and 23 deletions

View File

@ -9,8 +9,8 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 30 versionCode 31
versionName "1.10.0" versionName "1.10.1"
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -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

View File

@ -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

View File

@ -416,7 +416,6 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
setTitleCustom(R.string.title_discover); setTitleCustom(R.string.title_discover);
if (Helper.isLoggedIn(MainActivity.this)) { if (Helper.isLoggedIn(MainActivity.this)) {
navView.inflateMenu(R.menu.bottom_nav_menu_connected); navView.inflateMenu(R.menu.bottom_nav_menu_connected);
refreshToken(); refreshToken();
@ -566,25 +565,7 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
oauthParams.setAccess_token(account.getToken()); oauthParams.setAccess_token(account.getToken());
try { try {
Token token = new RetrofitPeertubeAPI(MainActivity.this).manageToken(oauthParams); Token token = new RetrofitPeertubeAPI(MainActivity.this).manageToken(oauthParams);
if (token == null && Helper.instanceOnline(instance)) { if (token == null) {
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) {
return; return;
} }
runOnUiThread(() -> { runOnUiThread(() -> {
@ -622,7 +603,22 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
} }
instanceConfig = new RetrofitPeertubeAPI(MainActivity.this).getConfigInstance(); instanceConfig = new RetrofitPeertubeAPI(MainActivity.this).getConfigInstance();
} catch (Error error) { } 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(); error.printStackTrace();
} }
} }