Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 6af1bf8

Browse files
committed
Merge branch 'release/tchap_v1.0.47'
2 parents 21405e4 + 5f582e6 commit 6af1bf8

File tree

7 files changed

+35
-11
lines changed

7 files changed

+35
-11
lines changed

TCHAP_CHANGES.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
Changes in Tchap 1.0.46 (2020-09-26)
1+
Changes in Tchap 1.0.47 (2020-10-02)
2+
===================================================
3+
4+
Bug Fixes:
5+
* Configure correctly activity launchmode PR #630
6+
* Fix searchview cursor color PR #633
7+
* fix crash loop back off on invalid access token #636
8+
* [Expired Account] Tchap is stuck on the splash screen whereas the account is renewed #639
9+
10+
Changes in Tchap 1.0.46 (2020-09-26)
211
===================================================
312

413
Improvements:

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ buildscript {
2323

2424
// global properties used in sub modules
2525
ext {
26-
versionCodeProp = 71
27-
versionNameProp = "1.0.46"
26+
versionCodeProp = 72
27+
versionNameProp = "1.0.47"
2828
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
2929
buildNumberProp = "${versionBuild}"
3030
}

vector/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@
8787
<activity
8888
android:name="fr.gouv.tchap.activity.NotificationListenerDetectionActivity"
8989
android:configChanges="orientation|screenSize"
90-
android:theme="@style/AppTheme.NoActionBar.Swipe.Dark">
90+
android:theme="@style/AppTheme.NoActionBar.Swipe.Dark"
91+
android:launchMode="singleTask"
92+
android:taskAffinity="">
9193
<intent-filter>
9294
<action android:name="android.intent.action.MAIN" />
9395
<category android:name="android.intent.category.LAUNCHER" />

vector/src/main/java/im/vector/activity/CommonActivityUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public static void onApplicationStarted(Activity activity) {
258258
PreferenceManager.getDefaultSharedPreferences(activity)
259259
.edit()
260260
.putBoolean(RESTART_IN_PROGRESS_KEY, false)
261-
.apply();
261+
.commit();
262262
}
263263

264264

@@ -285,7 +285,7 @@ public static void restartApp(Context activity, boolean invalidatedCredentials)
285285
preferences
286286
.edit()
287287
.putBoolean(RESTART_IN_PROGRESS_KEY, true)
288-
.apply();
288+
.commit();
289289

290290
Intent loginIntent = new Intent(activity, TchapLoginActivity.class);
291291
if (invalidatedCredentials) {

vector/src/main/java/im/vector/services/EventStreamServiceX.kt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class EventStreamServiceX : VectorService() {
164164
}
165165
val action = intent.action
166166

167-
Log.i(LOG_TAG, "onStartCommand with action : $action (current state $serviceState)")
167+
Log.i(LOG_TAG, "onStartCommand with action : $action (current state $serviceState) $this")
168168

169169
// Manage foreground notification
170170
when (action) {
@@ -220,9 +220,17 @@ class EventStreamServiceX : VectorService() {
220220
EventStreamServiceX.ServiceState.CATCHUP ->
221221
// A push has been received before, just change state, to avoid stopping the service when catchup is over
222222
serviceState = ServiceState.STARTED
223-
EventStreamServiceX.ServiceState.STARTED -> {
224-
// Nothing to do
225-
}
223+
EventStreamServiceX.ServiceState.STARTED ->
224+
// Force a restart if the currentSyncToken is null whereas the store is ready.
225+
// This means the service is not correctly started because the syncToken should
226+
// be updated as soon as the event stream is started (This case is observed when
227+
// the account has expired).
228+
if (null == mSession?.currentSyncToken && mSession?.dataHandler?.store?.isReady ?: false) {
229+
mSession!!.stopEventStream()
230+
mSession!!.dataHandler.removeListener(mEventsListener)
231+
CallsManager.getSharedInstance().removeSession(mSession)
232+
start(false)
233+
}
226234
}
227235
}
228236
ACTION_STOP,

vector/src/main/res/layout/activity_home.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
android:layout_marginTop="12dp"
3636
android:background="@drawable/tchap_search_field"
3737
android:clickable="true"
38-
android:textAlignment="center" />
38+
android:textAlignment="center"
39+
android:theme="@style/Toolbar.SearchView.Light"/>
3940
</androidx.appcompat.widget.Toolbar>
4041

4142
<com.google.android.material.tabs.TabLayout

vector/src/main/res/values/theme_light.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@
198198
<item name="editTextColor">@android:color/white</item>
199199
<item name="android:editTextColor">@android:color/white</item>
200200
<item name="android:textColorHint">?attr/vctr_activity_bottom_gradient_color</item>
201+
</style>
202+
203+
<!-- toolbar searchview -->
204+
<style name="Toolbar.SearchView.Light" parent="Widget.AppCompat.SearchView">
201205
<item name="colorControlActivated">@android:color/white</item>
202206
</style>
203207

0 commit comments

Comments
 (0)