diff --git a/CHANGES.md b/CHANGES.md index a4a3f7ee73..52338e9e61 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ Bugfix 🐛: - Tapping drawer having more than 1 room in notifications gives "malformed link" error (#2605) - Sent image not displayed when opened immediately after sending (#409) - Initial sync is not retried correctly when there is some network error. (#2632) + - Fix switch theme issue, and white field issue (#2599, #2528) - Fix request too large Uri error when joining a room Translations 🗣: diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/task/CoroutineSequencersTest.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/task/CoroutineSequencersTest.kt index 667e0b2471..74b6c03d93 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/task/CoroutineSequencersTest.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/task/CoroutineSequencersTest.kt @@ -38,19 +38,16 @@ class CoroutineSequencersTest: MatrixTest { val jobs = listOf( GlobalScope.launch(dispatcher) { - sequencer.post { suspendingMethod("#1") }.also { - results.add(it) - } + sequencer.post { suspendingMethod("#1") } + .also { results.add(it) } }, GlobalScope.launch(dispatcher) { - sequencer.post { suspendingMethod("#2") }.also { - results.add(it) - } + sequencer.post { suspendingMethod("#2") } + .also { results.add(it) } }, GlobalScope.launch(dispatcher) { - sequencer.post { suspendingMethod("#3") }.also { - results.add(it) - } + sequencer.post { suspendingMethod("#3") } + .also { results.add(it) } } ) runBlocking { @@ -70,19 +67,16 @@ class CoroutineSequencersTest: MatrixTest { val results = ArrayList() val jobs = listOf( GlobalScope.launch(dispatcher) { - sequencer1.post { suspendingMethod("#1") }.also { - results.add(it) - } + sequencer1.post { suspendingMethod("#1") } + .also { results.add(it) } }, GlobalScope.launch(dispatcher) { - sequencer2.post { suspendingMethod("#2") }.also { - results.add(it) - } + sequencer2.post { suspendingMethod("#2") } + .also { results.add(it) } }, GlobalScope.launch(dispatcher) { - sequencer3.post { suspendingMethod("#3") }.also { - results.add(it) - } + sequencer3.post { suspendingMethod("#3") } + .also { results.add(it) } } ) runBlocking { @@ -97,20 +91,17 @@ class CoroutineSequencersTest: MatrixTest { val results = ArrayList() val jobs = listOf( GlobalScope.launch(dispatcher) { - sequencer.post { suspendingMethod("#1") }.also { - results.add(it) - } + sequencer.post { suspendingMethod("#1") } + .also { results.add(it) } }, GlobalScope.launch(dispatcher) { - val result = sequencer.post { suspendingMethod("#2") }.also { - results.add(it) - } - println("Result: $result") + sequencer.post { suspendingMethod("#2") } + .also { results.add(it) } + .also { println("Result: $it") } }, GlobalScope.launch(dispatcher) { - sequencer.post { suspendingMethod("#3") }.also { - results.add(it) - } + sequencer.post { suspendingMethod("#3") } + .also { results.add(it) } } ) // We are canceling the second job diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml index 4ad51fdea7..0341059674 100644 --- a/vector/src/main/AndroidManifest.xml +++ b/vector/src/main/AndroidManifest.xml @@ -82,8 +82,7 @@ + android:name=".features.home.HomeActivity" /> (), UnlockedActiv intent.putExtra(EXTRA_ARGS, args) activity.startActivity(intent) - // Ensure all the Activities are destroyed, it seems that the intent flags are not enough now. - activity.finishAffinity() } } diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodViewModel.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodViewModel.kt index e309869479..4518a8d6b7 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodViewModel.kt @@ -89,8 +89,8 @@ class VerificationChooseMethodViewModel @AssistedInject constructor( } override fun onCleared() { - super.onCleared() session.cryptoService().verificationService().removeListener(this) + super.onCleared() } companion object : MvRxViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsViewModel.kt b/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsViewModel.kt index 0f294e080a..d16ebcdc8b 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsViewModel.kt @@ -93,8 +93,8 @@ class DiscoverySettingsViewModel @AssistedInject constructor( } override fun onCleared() { - super.onCleared() stopListenToIdentityManager() + super.onCleared() } override fun handle(action: DiscoverySettingsAction) { diff --git a/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt index 666bd21add..a3f1c36d08 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt @@ -810,9 +810,8 @@ class LoginViewModel @AssistedInject constructor( } override fun onCleared() { - super.onCleared() - currentTask?.cancel() + super.onCleared() } fun getInitialHomeServerUrl(): String? { diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt index c58e255bcc..b047b2ede9 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt @@ -221,7 +221,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(@Assisted initialState: } override fun onCleared() { - super.onCleared() currentTask?.cancel() + super.onCleared() } } diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutViewModel.kt b/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutViewModel.kt index f1d9a66342..81ac1dbd54 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutViewModel.kt @@ -232,8 +232,7 @@ class SoftLogoutViewModel @AssistedInject constructor( } override fun onCleared() { - super.onCleared() - currentTask?.cancel() + super.onCleared() } } diff --git a/vector/src/main/java/im/vector/app/features/workers/signout/ServerBackupStatusViewModel.kt b/vector/src/main/java/im/vector/app/features/workers/signout/ServerBackupStatusViewModel.kt index 48f83b6c54..68f62cffe5 100644 --- a/vector/src/main/java/im/vector/app/features/workers/signout/ServerBackupStatusViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/workers/signout/ServerBackupStatusViewModel.kt @@ -157,8 +157,8 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS } override fun onCleared() { - super.onCleared() session.cryptoService().keysBackupService().removeListener(this) + super.onCleared() } override fun onStateChange(newState: KeysBackupState) { diff --git a/vector/src/main/java/im/vector/app/features/workers/signout/SignoutCheckViewModel.kt b/vector/src/main/java/im/vector/app/features/workers/signout/SignoutCheckViewModel.kt index 48426be723..8a1055e780 100644 --- a/vector/src/main/java/im/vector/app/features/workers/signout/SignoutCheckViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/workers/signout/SignoutCheckViewModel.kt @@ -107,8 +107,8 @@ class SignoutCheckViewModel @AssistedInject constructor(@Assisted initialState: } override fun onCleared() { - super.onCleared() session.cryptoService().keysBackupService().removeListener(this) + super.onCleared() } override fun onStateChange(newState: KeysBackupState) {