From 52d37baee5d0e73cb40a13e280b3c49ffd6e30b0 Mon Sep 17 00:00:00 2001 From: yostyle Date: Tue, 29 Sep 2020 12:44:58 +0200 Subject: [PATCH 1/7] Configure correctly activity launchmode --- vector/src/main/AndroidManifest.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml index 643403526..8654e7e70 100755 --- a/vector/src/main/AndroidManifest.xml +++ b/vector/src/main/AndroidManifest.xml @@ -87,7 +87,9 @@ + android:theme="@style/AppTheme.NoActionBar.Swipe.Dark" + android:launchMode="singleTask" + android:taskAffinity=""> From a3573540b8b301e1890e6447f5f15f40bc9eeecf Mon Sep 17 00:00:00 2001 From: Giom Foret Date: Wed, 30 Sep 2020 00:26:08 +0200 Subject: [PATCH 2/7] Update develop version --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c2d17e02b..0d048a392 100755 --- a/build.gradle +++ b/build.gradle @@ -23,8 +23,8 @@ buildscript { // global properties used in sub modules ext { - versionCodeProp = 71 - versionNameProp = "1.0.46" + versionCodeProp = 72 + versionNameProp = "1.0.47_dev" versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0 buildNumberProp = "${versionBuild}" } From 89249d50138f4d708cd698fb58a38a92bb3d217c Mon Sep 17 00:00:00 2001 From: yostyle Date: Wed, 30 Sep 2020 11:13:50 +0200 Subject: [PATCH 3/7] Fix cursor color --- vector/src/main/res/layout/activity_home.xml | 25 ++++++++++---------- vector/src/main/res/values/theme_light.xml | 4 ++++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/vector/src/main/res/layout/activity_home.xml b/vector/src/main/res/layout/activity_home.xml index 7caf55a1a..d556a4b83 100644 --- a/vector/src/main/res/layout/activity_home.xml +++ b/vector/src/main/res/layout/activity_home.xml @@ -35,7 +35,8 @@ android:layout_marginTop="12dp" android:background="@drawable/tchap_search_field" android:clickable="true" - android:textAlignment="center" /> + android:textAlignment="center" + android:theme="@style/Toolbar.SearchView.Light"/> + app:layout_constraintTop_toBottomOf="@id/home_keys_backup_banner" > + + + - @android:color/white @android:color/white ?attr/vctr_activity_bottom_gradient_color + + + + From 35962b1effc18a6dcb984a736ad3621730dd1045 Mon Sep 17 00:00:00 2001 From: yostyle Date: Wed, 30 Sep 2020 15:11:06 +0200 Subject: [PATCH 4/7] Restore home activity layout --- vector/src/main/res/layout/activity_home.xml | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/vector/src/main/res/layout/activity_home.xml b/vector/src/main/res/layout/activity_home.xml index d556a4b83..fd84b37ec 100644 --- a/vector/src/main/res/layout/activity_home.xml +++ b/vector/src/main/res/layout/activity_home.xml @@ -114,18 +114,20 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toBottomOf="@id/home_keys_backup_banner" > - - - + app:layout_constraintTop_toBottomOf="@id/home_keys_backup_banner" /> + Date: Thu, 1 Oct 2020 10:06:04 +0200 Subject: [PATCH 5/7] fix crash loop back off --- .../src/main/java/im/vector/activity/CommonActivityUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/activity/CommonActivityUtils.java b/vector/src/main/java/im/vector/activity/CommonActivityUtils.java index c35c0cce4..1128f8901 100755 --- a/vector/src/main/java/im/vector/activity/CommonActivityUtils.java +++ b/vector/src/main/java/im/vector/activity/CommonActivityUtils.java @@ -258,7 +258,7 @@ public static void onApplicationStarted(Activity activity) { PreferenceManager.getDefaultSharedPreferences(activity) .edit() .putBoolean(RESTART_IN_PROGRESS_KEY, false) - .apply(); + .commit(); } @@ -285,7 +285,7 @@ public static void restartApp(Context activity, boolean invalidatedCredentials) preferences .edit() .putBoolean(RESTART_IN_PROGRESS_KEY, true) - .apply(); + .commit(); Intent loginIntent = new Intent(activity, TchapLoginActivity.class); if (invalidatedCredentials) { From 41c8692814b09de22f747415d82a37b12b176971 Mon Sep 17 00:00:00 2001 From: Giom Foret Date: Fri, 2 Oct 2020 12:16:37 +0200 Subject: [PATCH 6/7] version ++ --- TCHAP_CHANGES.rst | 10 +++++++++- build.gradle | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/TCHAP_CHANGES.rst b/TCHAP_CHANGES.rst index f10320b12..dd8a9983d 100644 --- a/TCHAP_CHANGES.rst +++ b/TCHAP_CHANGES.rst @@ -1,4 +1,12 @@ -Changes in Tchap 1.0.46 (2020-09-26) +Changes in Tchap 1.0.47 (2020-10-02) +=================================================== + +Bug Fixes: + * Configure correctly activity launchmode PR #630 + * Fix searchview cursor color PR #633 + * fix crash loop back off on invalid access token #636 + + Changes in Tchap 1.0.46 (2020-09-26) =================================================== Improvements: diff --git a/build.gradle b/build.gradle index 0d048a392..5e4fc2bc2 100755 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ buildscript { // global properties used in sub modules ext { versionCodeProp = 72 - versionNameProp = "1.0.47_dev" + versionNameProp = "1.0.47" versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0 buildNumberProp = "${versionBuild}" } From 66cb4f56ecd136a3b129fc106355b2f2378711db Mon Sep 17 00:00:00 2001 From: Giom Foret Date: Wed, 7 Oct 2020 00:49:35 +0200 Subject: [PATCH 7/7] Bug Fix: [Expired Account] Tchap is stuck on the splash screen whereas the account is renewed Force a restart if the currentSyncToken is null whereas the store is ready. --- TCHAP_CHANGES.rst | 1 + .../im/vector/services/EventStreamServiceX.kt | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/TCHAP_CHANGES.rst b/TCHAP_CHANGES.rst index dd8a9983d..e7886a99b 100644 --- a/TCHAP_CHANGES.rst +++ b/TCHAP_CHANGES.rst @@ -5,6 +5,7 @@ Bug Fixes: * Configure correctly activity launchmode PR #630 * Fix searchview cursor color PR #633 * fix crash loop back off on invalid access token #636 + * [Expired Account] Tchap is stuck on the splash screen whereas the account is renewed #639 Changes in Tchap 1.0.46 (2020-09-26) =================================================== diff --git a/vector/src/main/java/im/vector/services/EventStreamServiceX.kt b/vector/src/main/java/im/vector/services/EventStreamServiceX.kt index 3a21c0033..22c220339 100755 --- a/vector/src/main/java/im/vector/services/EventStreamServiceX.kt +++ b/vector/src/main/java/im/vector/services/EventStreamServiceX.kt @@ -164,7 +164,7 @@ class EventStreamServiceX : VectorService() { } val action = intent.action - Log.i(LOG_TAG, "onStartCommand with action : $action (current state $serviceState)") + Log.i(LOG_TAG, "onStartCommand with action : $action (current state $serviceState) $this") // Manage foreground notification when (action) { @@ -220,9 +220,17 @@ class EventStreamServiceX : VectorService() { EventStreamServiceX.ServiceState.CATCHUP -> // A push has been received before, just change state, to avoid stopping the service when catchup is over serviceState = ServiceState.STARTED - EventStreamServiceX.ServiceState.STARTED -> { - // Nothing to do - } + EventStreamServiceX.ServiceState.STARTED -> + // Force a restart if the currentSyncToken is null whereas the store is ready. + // This means the service is not correctly started because the syncToken should + // be updated as soon as the event stream is started (This case is observed when + // the account has expired). + if (null == mSession?.currentSyncToken && mSession?.dataHandler?.store?.isReady ?: false) { + mSession!!.stopEventStream() + mSession!!.dataHandler.removeListener(mEventsListener) + CallsManager.getSharedInstance().removeSession(mSession) + start(false) + } } } ACTION_STOP,