From dac975bbd2238d948a1374d2cdd84715589f9b93 Mon Sep 17 00:00:00 2001 From: Philippe Weidmann Date: Wed, 24 Apr 2024 13:44:54 +0200 Subject: [PATCH] fix: Silence some warning for sentry logs casting --- .../Thread/WebView/WebViewModel+MessageHandler.swift | 10 +++++----- MailCore/Utils/SentryDebug.swift | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Mail/Views/Thread/WebView/WebViewModel+MessageHandler.swift b/Mail/Views/Thread/WebView/WebViewModel+MessageHandler.swift index a353845b1..2b43520e8 100644 --- a/Mail/Views/Thread/WebView/WebViewModel+MessageHandler.swift +++ b/Mail/Views/Thread/WebView/WebViewModel+MessageHandler.swift @@ -57,8 +57,8 @@ extension WebViewModel: WKScriptMessageHandler { SentrySDK.capture(message: "After zooming the mail it can still scroll.") { scope in scope.setTags(["messageUid": data["messageId"] as? String ?? ""]) scope.setExtras([ - "clientWidth": data["clientWidth"], - "scrollWidth": data["scrollWidth"] + "clientWidth": data["clientWidth"] as Any, + "scrollWidth": data["scrollWidth"] as Any ]) } } @@ -69,9 +69,9 @@ extension WebViewModel: WKScriptMessageHandler { SentrySDK.capture(message: "JavaScript returned an error when displaying an email.") { scope in scope.setTags(["messageUid": data["messageId"] ?? ""]) scope.setExtras([ - "errorName": data["errorName"], - "errorMessage": data["errorMessage"], - "errorStack": data["errorStack"] + "errorName": data["errorName"] as Any, + "errorMessage": data["errorMessage"] as Any, + "errorStack": data["errorStack"] as Any ]) } } diff --git a/MailCore/Utils/SentryDebug.swift b/MailCore/Utils/SentryDebug.swift index df4900bd6..d0999e7ea 100644 --- a/MailCore/Utils/SentryDebug.swift +++ b/MailCore/Utils/SentryDebug.swift @@ -208,7 +208,7 @@ public enum SentryDebug { "Seen": ["Expected": actualSeen, "Actual": liveMessage.seen], "Folder": ["id": message.folder?.remoteId ?? "nil", "name": message.folder?.matomoName ?? "nil", - "last update": message.folder?.lastUpdate, + "last update": message.folder?.lastUpdate as Any, "cursor": message.folder?.cursor ?? "nil"]], key: "Message context") }