From 37e722e85d242a56dc571e6e945d2ac22d9a06dc Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 12 Aug 2021 02:36:39 +0300 Subject: [PATCH 1/3] version++ --- vector/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/build.gradle b/vector/build.gradle index c3be35bb81..85fdafc7f8 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -14,7 +14,7 @@ kapt { // Note: 2 digits max for each value ext.versionMajor = 1 ext.versionMinor = 2 -ext.versionPatch = 0 +ext.versionPatch = 1 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' From 3a1cb53c985a97ee737aa526d4febdc6ebd9d333 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Wed, 11 Aug 2021 22:06:18 +0200 Subject: [PATCH 2/3] Fix some UP crashes Change-Id: I16f47f86a58c23210cc99c85081da1703bbda5ac --- .../im/vector/app/core/pushers/VectorMessagingReceiver.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/pushers/VectorMessagingReceiver.kt b/vector/src/main/java/im/vector/app/core/pushers/VectorMessagingReceiver.kt index acfe22cb11..04d4cfeb0e 100755 --- a/vector/src/main/java/im/vector/app/core/pushers/VectorMessagingReceiver.kt +++ b/vector/src/main/java/im/vector/app/core/pushers/VectorMessagingReceiver.kt @@ -51,6 +51,7 @@ import org.unifiedpush.android.connector.MessagingReceiver import org.unifiedpush.android.connector.MessagingReceiverHandler import timber.log.Timber +@JsonClass(generateAdapter = true) data class UnifiedPushMessage( val notification: Notification ) @@ -117,10 +118,10 @@ val upHandler = object: MessagingReceiverHandler { if (UPHelper.isEmbeddedDistributor(context)) { notification = moshi.adapter(Notification::class.java) - .fromJson(message)!! + .fromJson(message) ?: return } else { val data = moshi.adapter(UnifiedPushMessage::class.java) - .fromJson(message)!! + .fromJson(message) ?: return notification = data.notification notification.unread = notification.counts.unread } From 7e258282a2a83ddc875ac6f0ac7f7e09db724608 Mon Sep 17 00:00:00 2001 From: S1m Date: Mon, 16 Aug 2021 18:01:10 +0200 Subject: [PATCH 3/3] Change troubleshoot description if using FCM --- .../settings/troubleshoot/TestNewEndpoint.kt | 20 ++++++++++++++----- vector/src/main/res/values/strings.xml | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt index cb09046628..76e1b7c662 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt @@ -35,12 +35,22 @@ class TestNewEndpoint @Inject constructor(private val context: AppCompatActivity val endpoint = UPHelper.getUpEndpoint(context) - if (!endpoint.isNullOrEmpty()) { - status = TestStatus.SUCCESS - description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_success, endpoint) + if (UPHelper.isEmbeddedDistributor(context)) { + if (!endpoint.isNullOrEmpty()) { + status = TestStatus.SUCCESS + description = stringProvider.getString(R.string.settings_troubleshoot_test_fcm_success, endpoint) + } else { + status = TestStatus.FAILED + description = stringProvider.getString(R.string.settings_troubleshoot_test_fcm_failed) + } } else { - status = TestStatus.FAILED - description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_failed) + if (!endpoint.isNullOrEmpty()) { + status = TestStatus.SUCCESS + description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_success, endpoint) + } else { + status = TestStatus.FAILED + description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_failed) + } } } } diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index bd73930f19..409fde1d01 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1132,7 +1132,7 @@ Fix Play Services - Endpoint + Endpoint/FCM Endpoint successfully retrieved:\n%1$s Failed to retrieved Endpoint.