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

Commit

Permalink
Merge branch 'release/tchap_v1.0.47'
Browse files Browse the repository at this point in the history
  • Loading branch information
giomfo committed Oct 7, 2020
2 parents 21405e4 + 5f582e6 commit 6af1bf8
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 11 deletions.
11 changes: 10 additions & 1 deletion TCHAP_CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
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
* [Expired Account] Tchap is stuck on the splash screen whereas the account is renewed #639

Changes in Tchap 1.0.46 (2020-09-26)
===================================================

Improvements:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ buildscript {

// global properties used in sub modules
ext {
versionCodeProp = 71
versionNameProp = "1.0.46"
versionCodeProp = 72
versionNameProp = "1.0.47"
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
buildNumberProp = "${versionBuild}"
}
Expand Down
4 changes: 3 additions & 1 deletion vector/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
<activity
android:name="fr.gouv.tchap.activity.NotificationListenerDetectionActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar.Swipe.Dark">
android:theme="@style/AppTheme.NoActionBar.Swipe.Dark"
android:launchMode="singleTask"
android:taskAffinity="">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static void onApplicationStarted(Activity activity) {
PreferenceManager.getDefaultSharedPreferences(activity)
.edit()
.putBoolean(RESTART_IN_PROGRESS_KEY, false)
.apply();
.commit();
}


Expand All @@ -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) {
Expand Down
16 changes: 12 additions & 4 deletions vector/src/main/java/im/vector/services/EventStreamServiceX.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
</androidx.appcompat.widget.Toolbar>

<com.google.android.material.tabs.TabLayout
Expand Down
4 changes: 4 additions & 0 deletions vector/src/main/res/values/theme_light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
<item name="editTextColor">@android:color/white</item>
<item name="android:editTextColor">@android:color/white</item>
<item name="android:textColorHint">?attr/vctr_activity_bottom_gradient_color</item>
</style>

<!-- toolbar searchview -->
<style name="Toolbar.SearchView.Light" parent="Widget.AppCompat.SearchView">
<item name="colorControlActivated">@android:color/white</item>
</style>

Expand Down

0 comments on commit 6af1bf8

Please sign in to comment.