From f1825ae75ed6ffed70c4749f0acfbe2c552af5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Thu, 9 Jul 2020 21:17:21 +0200 Subject: [PATCH 1/2] Fix token refresh --- .../peertube/adapter/ServerListAdapter.java | 7 +++++++ .../network/AccessTokenAuthenticator.java | 21 ++++++++++++++++++- .../peertube/network/RetrofitInstance.java | 2 +- .../schueller/peertube/network/Session.java | 6 ++++++ .../peertube/service/LoginService.java | 10 ++++----- app/src/main/res/values/strings.xml | 2 ++ 6 files changed, 41 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/net/schueller/peertube/adapter/ServerListAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/ServerListAdapter.java index 1e8ba2f..bfb48b4 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/ServerListAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/ServerListAdapter.java @@ -37,6 +37,7 @@ import net.schueller.peertube.R; import net.schueller.peertube.database.Server; import net.schueller.peertube.helper.APIUrlHelper; +import net.schueller.peertube.network.Session; import net.schueller.peertube.service.LoginService; @@ -89,6 +90,12 @@ public class ServerListAdapter extends RecyclerView.Adapter call2, @NonNull Throwable t2) { Log.wtf("err", t2.fillInStackTrace()); - Toast.makeText(context, context.getString(R.string.authentication_login_failed), Toast.LENGTH_LONG).show(); + Toast.makeText(context, context.getString(R.string.authentication_token_refresh_failed), Toast.LENGTH_LONG).show(); } }); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bc8e6df..b7ed2ba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -358,6 +358,8 @@ Automated Build Time + Token refresh failed + Token refresh successful \ No newline at end of file From fc5a5652691029ee706ecbe5e4e1f9af03ad12af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Fri, 10 Jul 2020 21:44:46 +0200 Subject: [PATCH 2/2] Release --- CHANGELOG.md | 3 +++ app/build.gradle | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90e501a..4b9fd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Version 1.0.47 Tag: v1.0.47 (2020-07-10) + * Authentication refresh + ### Version 1.0.46 Tag: v1.0.46 (2020-07-08) * Revert broken auth diff --git a/app/build.gradle b/app/build.gradle index e398ba5..ca28fbb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "net.schueller.peertube" minSdkVersion 21 targetSdkVersion 29 - versionCode 1046 - versionName "1.0.46" + versionCode 1047 + versionName "1.0.47" buildConfigField "long", "BUILD_TIME", readPropertyWithDefault('buildTimestamp', System.currentTimeMillis()) + 'L' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ext {