From d2390de135f272647cdf8ea12ff56d2e8bf3f13e Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 6 Jul 2023 14:44:44 +0200 Subject: [PATCH 01/12] Upgrade version to 2.9.1 --- towncrier.toml | 2 +- vector-app/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/towncrier.toml b/towncrier.toml index c31bc93eb6..20b847b1ae 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -1,5 +1,5 @@ [tool.towncrier] - version = "2.9.0" + version = "2.9.1" directory = "changelog.d" filename = "TCHAP_CHANGES.md" name = "Changes in Tchap" diff --git a/vector-app/build.gradle b/vector-app/build.gradle index 05d03029e6..72a0b418f2 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -37,7 +37,7 @@ ext.versionMinor = 9 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -ext.versionPatch = 0 +ext.versionPatch = 1 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' From b17c8c3b89e090e27ee294b0b625f2e0a79dcd0a Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 6 Jul 2023 15:25:20 +0200 Subject: [PATCH 02/12] Update Github workflow to build production APKs --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d8f6c45dd..700f9534e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: strategy: fail-fast: false matrix: - target: [ GplayBtchapWithoutvoipWithpinning, GplayTchapWithoutvoipWithpinning, FdroidBtchapWithoutvoipWithoutpinning, FdroidTchapWithoutvoipWithoutpinning, GplayBtchapWithvoipWithpinning ] + target: [ GplayBtchapRustCryptWithoutvoipWithpinning, GplayTchapRustCryptWithoutvoipWithpinning, FdroidBtchapRustCryptWithoutvoipWithoutpinning, FdroidTchapRustCryptWithoutvoipWithoutpinning, GplayBtchapRustCryptWithvoipWithpinning ] concurrency: # Tchap: custom group group: ${{ github.ref == 'refs/head/main' && format('build-release-apk-main-{0}-{1}', github.sha, matrix.target) || startsWith(github.ref, 'refs/tags/tchap_v') && format('build-release-apk-tag-{0}-{1}', github.sha, matrix.target) }} From e1110b6bb4c08fbcbd841d144eb5d5cdda6bf3a1 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 11 Jul 2023 15:35:45 +0200 Subject: [PATCH 03/12] =?UTF-8?q?Am=C3=A9lioration=20UX,=20wording=20et=20?= =?UTF-8?q?organisation=20des=20settings=20s=C3=A9curit=C3=A9=20(partie=20?= =?UTF-8?q?II,=20multidevice)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/values-fr/strings.xml | 2 +- ...eysBackupSettingsRecyclerViewController.kt | 5 +++-- .../VectorSettingsSecurityPrivacyFragment.kt | 15 +++++++++++++-- .../CrossSigningSettingsController.kt | 19 ++++++++++--------- .../src/main/res/drawable/ic_tchap_cancel.xml | 5 +++++ .../xml/vector_settings_security_privacy.xml | 13 ++++++------- 6 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 vector/src/main/res/drawable/ic_tchap_cancel.xml diff --git a/library/ui-strings/src/main/res/values-fr/strings.xml b/library/ui-strings/src/main/res/values-fr/strings.xml index a3d7edbb81..91efbce467 100644 --- a/library/ui-strings/src/main/res/values-fr/strings.xml +++ b/library/ui-strings/src/main/res/values-fr/strings.xml @@ -676,7 +676,7 @@ Configurer les notifications silencieuses Choisir la couleur de la LED, les vibrations, le son… Clés Tchap - Gérer la sauvegarde + Récupérer mes messages Silencieuse Veuillez saisir une phrase secrète La phrase secrète est trop faible diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt index 73ccef10c8..ee00951725 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt @@ -178,8 +178,9 @@ class KeysBackupSettingsRecyclerViewController @Inject constructor( textButton1(host.stringProvider.getString(R.string.keys_backup_settings_restore_backup_button)) clickOnButton1 { host.listener?.didSelectRestoreMessageRecovery() } - textButton2(host.stringProvider.getString(R.string.keys_backup_settings_delete_backup_button)) - clickOnButton2 { host.listener?.didSelectDeleteSetupMessageRecovery() } + // Tchap : hide "Suppress backup" button +// textButton2(host.stringProvider.getString(R.string.keys_backup_settings_delete_backup_button)) +// clickOnButton2 { host.listener?.didSelectDeleteSetupMessageRecovery() } } else { textButton1(host.stringProvider.getString(R.string.keys_backup_setup)) clickOnButton1 { host.listener?.didSelectSetupMessageRecovery() } diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt index e08cd1d6f7..2126902858 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt @@ -233,7 +233,18 @@ class VectorSettingsSecurityPrivacyFragment : } else { // just hide all, you can't setup from here // you should synchronize to get gossips - secureBackupCategory.isVisible = false + // Tchap : here, the section is hidden on Element. + // In Tchap, we want to show it. + secureBackupCategory.isVisible = true + secureBackupPreference.title = getString(R.string.settings_secure_backup_enter_to_setup) + secureBackupPreference.onPreferenceClickListener = Preference.OnPreferenceClickListener { + vectorActivity.let { + it.navigator.requestSelfSessionVerification(it) + } + true + } + // Tchap : remove "Manage backup" button because Secure backup is not activated + manageBackupPref.isVisible = false } } else { // so here we know that 4S is setup @@ -372,7 +383,7 @@ class VectorSettingsSecurityPrivacyFragment : mCrossSigningStatePreference.summary = getString(R.string.encryption_information_dg_xsigning_trusted) } xSigningIsEnableInAccount -> { - mCrossSigningStatePreference.setIcon(R.drawable.ic_shield_black) + mCrossSigningStatePreference.setIcon(R.drawable.ic_tchap_cancel) // Tchpa icon mCrossSigningStatePreference.summary = getString(R.string.encryption_information_dg_xsigning_not_trusted) } else -> { diff --git a/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt b/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt index dde32c1da0..6e8eef6a58 100644 --- a/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt +++ b/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt @@ -50,14 +50,15 @@ class CrossSigningSettingsController @Inject constructor( titleIconResourceId(R.drawable.ic_shield_trusted) title(host.stringProvider.getString(R.string.encryption_information_dg_xsigning_complete).toEpoxyCharSequence()) } - genericButtonItem { - id("Reset") - text(host.stringProvider.getString(R.string.reset_cross_signing)) - textColor(host.colorProvider.getColor(R.color.palette_tchap_coral)) // Tchap - buttonClickAction { - host.interactionListener?.didTapInitializeCrossSigning() - } - } + // Tchap : don't display "Reset cross-signing" button +// genericButtonItem { +// id("Reset") +// text(host.stringProvider.getString(R.string.reset_cross_signing)) +// textColor(host.colorProvider.getColor(R.color.palette_tchap_coral)) // Tchap +// buttonClickAction { +// host.interactionListener?.didTapInitializeCrossSigning() +// } +// } } data.xSigningKeysAreTrusted -> { genericItem { @@ -77,7 +78,7 @@ class CrossSigningSettingsController @Inject constructor( data.xSigningIsEnableInAccount -> { genericItem { id("enable") - titleIconResourceId(R.drawable.ic_shield_black) + titleIconResourceId(R.drawable.ic_tchap_cancel) // Tchap icon title(host.stringProvider.getString(R.string.encryption_information_dg_xsigning_not_trusted).toEpoxyCharSequence()) } genericButtonItem { diff --git a/vector/src/main/res/drawable/ic_tchap_cancel.xml b/vector/src/main/res/drawable/ic_tchap_cancel.xml new file mode 100644 index 0000000000..afde45223d --- /dev/null +++ b/vector/src/main/res/drawable/ic_tchap_cancel.xml @@ -0,0 +1,5 @@ + + + diff --git a/vector/src/main/res/xml/vector_settings_security_privacy.xml b/vector/src/main/res/xml/vector_settings_security_privacy.xml index 46b0c3ee37..5897cd7a12 100644 --- a/vector/src/main/res/xml/vector_settings_security_privacy.xml +++ b/vector/src/main/res/xml/vector_settings_security_privacy.xml @@ -11,6 +11,12 @@ android:focusable="false" android:persistent="false" android:summary="@string/settings_secure_backup_section_info" /> + - - From 271cc6f313c0ef60d3fa58d66f8528aa73082ac0 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 11 Jul 2023 15:52:23 +0200 Subject: [PATCH 04/12] Add changelog --- changelog.d/940.improvements | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/940.improvements diff --git a/changelog.d/940.improvements b/changelog.d/940.improvements new file mode 100644 index 0000000000..2ecd76d313 --- /dev/null +++ b/changelog.d/940.improvements @@ -0,0 +1 @@ +Amélioration UX, wording et organisation des settings sécurité (partie II, multidevice) (#940) \ No newline at end of file From bb343522d21841010a10949e69e0a8fd49908061 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 11 Jul 2023 16:58:34 +0200 Subject: [PATCH 05/12] Always return false on read property and force false on write property --- .../android/sdk/internal/crypto/store/db/RealmCryptoStore.kt | 4 +++- .../android/sdk/internal/crypto/store/RustCryptoStore.kt | 4 +++- .../vector/app/features/roomprofile/RoomProfileViewModel.kt | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt b/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt index e3595f6618..d5ffd0d3d6 100644 --- a/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt +++ b/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt @@ -1158,7 +1158,9 @@ internal class RealmCryptoStore @Inject constructor( } ) return Transformations.map(liveData) { - it.firstOrNull() ?: false + // Tchap : force to false to avoid "Never send messages to non verified devices" + // it.firstOrNull() ?: false + false } } diff --git a/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt b/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt index b242a3ed34..a565773bf1 100644 --- a/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt +++ b/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt @@ -372,7 +372,9 @@ internal class RustCryptoStore @Inject constructor( } ) return Transformations.map(liveData) { - it.firstOrNull() ?: false + // Tchap : force to false to avoid "Never send messages to non verified devices" + // it.firstOrNull() ?: false + false } } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt index 2f1b521d53..4ce1b260c4 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt @@ -292,7 +292,7 @@ class RoomProfileViewModel @AssistedInject constructor( private fun setEncryptToVerifiedDeviceOnly(enabled: Boolean) { session.coroutineScope.launch { - session.cryptoService().setRoomBlockUnverifiedDevices(room.roomId, enabled) + session.cryptoService().setRoomBlockUnverifiedDevices(room.roomId, enabled and false) // Tchap : force to false to deactivate "Never send messages to unverified devices in room" } } From 3945b5f6c52b72383cef1cdd222b70a02b19a429 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 11 Jul 2023 16:58:46 +0200 Subject: [PATCH 06/12] Hide setting --- .../roomprofile/RoomProfileController.kt | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt index 36c9f81886..19933158e3 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt @@ -205,30 +205,32 @@ class RoomProfileController @Inject constructor( host.callback?.openGlobalBlockSettings() } } - } else { - // per room setting is available - val shouldBlockUnverified = data.encryptToVerifiedDeviceOnly.invoke() - formSwitchItem { - id("send_to_unverified") - enabled(shouldBlockUnverified != null) - title(host.stringProvider.getString(R.string.encryption_never_send_to_unverified_devices_in_room)) - - switchChecked(shouldBlockUnverified ?: false) - - apply { - if (shouldBlockUnverified == true && data.unverifiedDevicesInTheRoom.invoke() == true) { - summary( - host.stringProvider.getString(R.string.some_devices_will_not_be_able_to_decrypt) - ) - } else { - summary(null) - } - } - listener { value -> - host.callback?.setEncryptedToVerifiedDevicesOnly(value) - } - } } + // Tchap : don't display option "Never send messages to unverified devices in room" +// else { +// // per room setting is available +// val shouldBlockUnverified = data.encryptToVerifiedDeviceOnly.invoke() +// formSwitchItem { +// id("send_to_unverified") +// enabled(shouldBlockUnverified != null) +// title(host.stringProvider.getString(R.string.encryption_never_send_to_unverified_devices_in_room)) +// +// switchChecked(shouldBlockUnverified ?: false) +// +// apply { +// if (shouldBlockUnverified == true && data.unverifiedDevicesInTheRoom.invoke() == true) { +// summary( +// host.stringProvider.getString(R.string.some_devices_will_not_be_able_to_decrypt) +// ) +// } else { +// summary(null) +// } +// } +// listener { value -> +// host.callback?.setEncryptedToVerifiedDevicesOnly(value) +// } +// } +// } } } // More From b311137f8f09a9195cdfba3c5c659fd675927c12 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 11 Jul 2023 16:59:38 +0200 Subject: [PATCH 07/12] Add changelog --- changelog.d/945.improvements | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/945.improvements diff --git a/changelog.d/945.improvements b/changelog.d/945.improvements new file mode 100644 index 0000000000..ca2de53974 --- /dev/null +++ b/changelog.d/945.improvements @@ -0,0 +1 @@ +Supprimer le blocage d'envoi de messages chiffrés aux appareils non vérifiés (945) \ No newline at end of file From b9b2955c29d8172f6ac9e35b9e85ffbfb4b4ddbe Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 11 Jul 2023 17:27:17 +0200 Subject: [PATCH 08/12] [CI] Rise Xmx memory value to achieve build --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 700f9534e9..440420bc39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,8 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false +# Tchap : up Xmx TO 4096 to achieve build in CI + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx4096m" -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon jobs: From 459867fd2c04c322365e8eef2ef1ae0642d7b0ba Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Fri, 21 Jul 2023 15:18:04 +0200 Subject: [PATCH 09/12] Remove Push Notification diagnostic test on server name --- changelog.d/950.fix | 1 + .../fcm/FdroidNotificationTroubleshootTestManagerFactory.kt | 6 +++--- .../fcm/GoogleNotificationTroubleshootTestManagerFactory.kt | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 changelog.d/950.fix diff --git a/changelog.d/950.fix b/changelog.d/950.fix new file mode 100644 index 0000000000..9e2a7a2e2a --- /dev/null +++ b/changelog.d/950.fix @@ -0,0 +1 @@ +Correction du test de Push Notification non adapté à Tchap #950 diff --git a/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt b/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt index d99afa59f7..c895338392 100644 --- a/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt +++ b/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt @@ -29,7 +29,7 @@ import im.vector.app.features.settings.troubleshoot.TestCurrentUnifiedPushDistri import im.vector.app.features.settings.troubleshoot.TestDeviceSettings import im.vector.app.features.settings.troubleshoot.TestEndpointAsTokenRegistration import im.vector.app.features.settings.troubleshoot.TestNotification -import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway +// import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway // Tchap : remove import im.vector.app.features.settings.troubleshoot.TestPushRulesSettings import im.vector.app.features.settings.troubleshoot.TestSystemSettings import im.vector.app.features.settings.troubleshoot.TestUnifiedPushEndpoint @@ -47,7 +47,7 @@ class FdroidNotificationTroubleshootTestManagerFactory @Inject constructor( private val testUnifiedPushEndpoint: TestUnifiedPushEndpoint, private val testAvailableUnifiedPushDistributors: TestAvailableUnifiedPushDistributors, private val testEndpointAsTokenRegistration: TestEndpointAsTokenRegistration, - private val testPushFromPushGateway: TestPushFromPushGateway, + // private val testPushFromPushGateway: TestPushFromPushGateway, // Tchap : remove private val testAutoStartBoot: TestAutoStartBoot, private val testBackgroundRestrictions: TestBackgroundRestrictions, private val testBatteryOptimization: TestBatteryOptimization, @@ -73,7 +73,7 @@ class FdroidNotificationTroubleshootTestManagerFactory @Inject constructor( mgr.addTest(testUnifiedPushGateway) mgr.addTest(testUnifiedPushEndpoint) mgr.addTest(testEndpointAsTokenRegistration) - mgr.addTest(testPushFromPushGateway) +// mgr.addTest(testPushFromPushGateway) // Tchap : remove } mgr.addTest(testNotification) return mgr diff --git a/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt b/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt index 1db26ad3a8..6ebfc78c79 100644 --- a/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt +++ b/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt @@ -26,7 +26,7 @@ import im.vector.app.features.settings.troubleshoot.TestCurrentUnifiedPushDistri import im.vector.app.features.settings.troubleshoot.TestDeviceSettings import im.vector.app.features.settings.troubleshoot.TestEndpointAsTokenRegistration import im.vector.app.features.settings.troubleshoot.TestNotification -import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway +// import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway // Tchap : remove import im.vector.app.features.settings.troubleshoot.TestPushRulesSettings import im.vector.app.features.settings.troubleshoot.TestSystemSettings import im.vector.app.features.settings.troubleshoot.TestUnifiedPushEndpoint @@ -50,7 +50,7 @@ class GoogleNotificationTroubleshootTestManagerFactory @Inject constructor( private val testUnifiedPushEndpoint: TestUnifiedPushEndpoint, private val testAvailableUnifiedPushDistributors: TestAvailableUnifiedPushDistributors, private val testEndpointAsTokenRegistration: TestEndpointAsTokenRegistration, - private val testPushFromPushGateway: TestPushFromPushGateway, + // private val testPushFromPushGateway: TestPushFromPushGateway, // Tchap : remove private val testNotification: TestNotification, private val vectorFeatures: VectorFeatures, ) : NotificationTroubleshootTestManagerFactory { @@ -75,7 +75,7 @@ class GoogleNotificationTroubleshootTestManagerFactory @Inject constructor( mgr.addTest(testUnifiedPushEndpoint) mgr.addTest(testEndpointAsTokenRegistration) } - mgr.addTest(testPushFromPushGateway) + // mgr.addTest(testPushFromPushGateway) // Tchap : remove mgr.addTest(testNotification) return mgr } From 7bed83c75fa0a57af8133d6b21352e8ba5631c7b Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Wed, 26 Jul 2023 12:23:29 +0200 Subject: [PATCH 10/12] =?UTF-8?q?Probl=C3=A8me=20de=20copie=20du=20code=20?= =?UTF-8?q?de=20r=C3=A9cup=C3=A9ration=20apr=C3=A8s=20g=C3=A9n=C3=A9ration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.d/953.bugfix | 1 + .../recover/BootstrapSaveRecoveryKeyFragment.kt | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 changelog.d/953.bugfix diff --git a/changelog.d/953.bugfix b/changelog.d/953.bugfix new file mode 100644 index 0000000000..1eeaba5fdb --- /dev/null +++ b/changelog.d/953.bugfix @@ -0,0 +1 @@ +Problème de copie du code de récupération après génération diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt index bed4d58b1e..f8750710e0 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt @@ -18,6 +18,9 @@ package im.vector.app.features.crypto.recover import android.app.Activity import android.content.ActivityNotFoundException +import android.content.ClipData +import android.content.ClipboardManager +import android.content.Context import android.content.Intent import android.os.Bundle import android.view.LayoutInflater @@ -93,7 +96,8 @@ class BootstrapSaveRecoveryKeyFragment : } private val copyStartForActivityResult = registerStartForActivityResult { activityResult -> - if (activityResult.resultCode == Activity.RESULT_OK) { + // Tchap : accept to close sheet even if result is RESULT_CANCELED. The Recovery code is in the clipboard. + if (activityResult.resultCode == Activity.RESULT_OK || activityResult.resultCode == Activity.RESULT_CANCELED) { // Tchap : Close the dialog without having to tap "Continue" sharedViewModel.handle(BootstrapActions.Completed) } @@ -103,6 +107,11 @@ class BootstrapSaveRecoveryKeyFragment : val recoveryKey = state.recoveryKeyCreationInfo?.recoveryKey?.formatRecoveryKey() ?: return@withState + // Tchap : copy recovery key to clipboard right now after "Copy" button is tapped. + val clipboard = requireContext().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager + val clip = ClipData.newPlainText("", recoveryKey) + clipboard.setPrimaryClip(clip) + startSharePlainTextIntent( requireContext(), copyStartForActivityResult, From e31a0ac32e6be91227b1b4485c76d753a8a031e2 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 27 Jul 2023 10:12:39 +0200 Subject: [PATCH 11/12] Fix changelog typo --- changelog.d/{950.fix => 950.bugfix} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{950.fix => 950.bugfix} (100%) diff --git a/changelog.d/950.fix b/changelog.d/950.bugfix similarity index 100% rename from changelog.d/950.fix rename to changelog.d/950.bugfix From 5ed60ce81c0e35683d0f5214f7b0e8d0ac6f4c96 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 27 Jul 2023 10:14:05 +0200 Subject: [PATCH 12/12] execute Towncrier --- TCHAP_CHANGES.md | 14 ++++++++++++++ changelog.d/940.improvements | 1 - changelog.d/945.improvements | 1 - changelog.d/950.bugfix | 1 - changelog.d/953.bugfix | 1 - 5 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/940.improvements delete mode 100644 changelog.d/945.improvements delete mode 100644 changelog.d/950.bugfix delete mode 100644 changelog.d/953.bugfix diff --git a/TCHAP_CHANGES.md b/TCHAP_CHANGES.md index 6d86336885..a9fcfe6c76 100644 --- a/TCHAP_CHANGES.md +++ b/TCHAP_CHANGES.md @@ -1,3 +1,17 @@ +Changes in Tchap 2.9.1 (2023-07-27) +=================================== + +Improvements 🙌 +-------------- + - Amélioration UX, wording et organisation des settings sécurité (partie II, multidevice) (#940) ([#940](https://github.com/tchapgouv/tchap-android-v2/issues/940)) + - Supprimer le blocage d'envoi de messages chiffrés aux appareils non vérifiés (945) ([#945](https://github.com/tchapgouv/tchap-android-v2/issues/945)) + +Bugfixes 🐛 +---------- + - Correction du test de Push Notification non adapté à Tchap #950 ([#950](https://github.com/tchapgouv/tchap-android-v2/issues/950)) + - Problème de copie du code de récupération après génération ([#953](https://github.com/tchapgouv/tchap-android-v2/issues/953)) + + Changes in Tchap 2.9.0 (2023-07-06) =================================== diff --git a/changelog.d/940.improvements b/changelog.d/940.improvements deleted file mode 100644 index 2ecd76d313..0000000000 --- a/changelog.d/940.improvements +++ /dev/null @@ -1 +0,0 @@ -Amélioration UX, wording et organisation des settings sécurité (partie II, multidevice) (#940) \ No newline at end of file diff --git a/changelog.d/945.improvements b/changelog.d/945.improvements deleted file mode 100644 index ca2de53974..0000000000 --- a/changelog.d/945.improvements +++ /dev/null @@ -1 +0,0 @@ -Supprimer le blocage d'envoi de messages chiffrés aux appareils non vérifiés (945) \ No newline at end of file diff --git a/changelog.d/950.bugfix b/changelog.d/950.bugfix deleted file mode 100644 index 9e2a7a2e2a..0000000000 --- a/changelog.d/950.bugfix +++ /dev/null @@ -1 +0,0 @@ -Correction du test de Push Notification non adapté à Tchap #950 diff --git a/changelog.d/953.bugfix b/changelog.d/953.bugfix deleted file mode 100644 index 1eeaba5fdb..0000000000 --- a/changelog.d/953.bugfix +++ /dev/null @@ -1 +0,0 @@ -Problème de copie du code de récupération après génération