From ce667eab1343b3aab4294c90b3c6eb2f476c18a8 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:14:52 +0000 Subject: [PATCH] Update Compound. (#2514) Fixes a bug with placeholder avatar rendering in Notifications. --- ElementX.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- .../Sources/Other/Extensions/UNNotificationContent.swift | 2 +- changelog.d/pr-2514.bugfix | 1 + project.yml | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 changelog.d/pr-2514.bugfix diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 12a858f5a..4eb5c8071 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -7120,7 +7120,7 @@ repositoryURL = "https://github.com/element-hq/compound-ios"; requirement = { kind = revision; - revision = 98bd0ed412c29bd5b3762b673ca5720b6fb9d713; + revision = 19c778b6ce0b82601ecdca23ff8d4a7aa41f990f; }; }; F76A08D0EA29A07A54F4EB4D /* XCRemoteSwiftPackageReference "swift-collections" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 7698ea97d..cbe6cb781 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/compound-design-tokens.git", "state" : { - "revision" : "d7c3bba963d6b7ffab862c3293eb242a8932a0c1", - "version" : "1.0.0" + "revision" : "c3fff1f2b042295cd5f4bcf8d4fe68ec47ca4061", + "version" : "1.2.0" } }, { @@ -14,7 +14,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/compound-ios", "state" : { - "revision" : "98bd0ed412c29bd5b3762b673ca5720b6fb9d713" + "revision" : "19c778b6ce0b82601ecdca23ff8d4a7aa41f990f" } }, { diff --git a/ElementX/Sources/Other/Extensions/UNNotificationContent.swift b/ElementX/Sources/Other/Extensions/UNNotificationContent.swift index 4424eb4d3..444002122 100644 --- a/ElementX/Sources/Other/Extensions/UNNotificationContent.swift +++ b/ElementX/Sources/Other/Extensions/UNNotificationContent.swift @@ -180,7 +180,7 @@ extension UNMutableNotificationContent { private func getPlaceholderAvatarImageData(name: String, id: String) async -> Data? { // The version value is used in case the design of the placeholder is updated to force a replacement let shouldFlipAvatar = shouldFlipAvatar() - let prefix = "notification_placeholder\(shouldFlipAvatar ? "V7" : "V6")" + let prefix = "notification_placeholder\(shouldFlipAvatar ? "V8F" : "V8")" let fileName = "\(prefix)_\(name)_\(id).png" if let data = try? Data(contentsOf: URL.temporaryDirectory.appendingPathComponent(fileName)) { MXLog.info("Found existing notification icon placeholder") diff --git a/changelog.d/pr-2514.bugfix b/changelog.d/pr-2514.bugfix new file mode 100644 index 000000000..a4298dfde --- /dev/null +++ b/changelog.d/pr-2514.bugfix @@ -0,0 +1 @@ +Fix a bug where some avatar backgrounds were hard to see in notifications. \ No newline at end of file diff --git a/project.yml b/project.yml index 0688849ea..aeb47e765 100644 --- a/project.yml +++ b/project.yml @@ -52,7 +52,7 @@ packages: # path: ../matrix-rust-sdk Compound: url: https://github.com/element-hq/compound-ios - revision: 98bd0ed412c29bd5b3762b673ca5720b6fb9d713 + revision: 19c778b6ce0b82601ecdca23ff8d4a7aa41f990f # path: ../compound-ios AnalyticsEvents: url: https://github.com/matrix-org/matrix-analytics-events