From 93f65c2d79a39b1c792b5b53b351340fe04c9cf5 Mon Sep 17 00:00:00 2001 From: IvanStepanok Date: Mon, 2 Dec 2024 16:09:30 +0200 Subject: [PATCH] fix: swift 6 bug with evaluate java script method --- Core/Core/Network/OfflineSyncManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Core/Network/OfflineSyncManager.swift b/Core/Core/Network/OfflineSyncManager.swift index ec8a8f4a..a5fd17eb 100644 --- a/Core/Core/Network/OfflineSyncManager.swift +++ b/Core/Core/Network/OfflineSyncManager.swift @@ -55,11 +55,11 @@ public class OfflineSyncManager: OfflineSyncManagerProtocol { ) var correctedProgressJson = progressJson correctedProgressJson = correctedProgressJson.removingPercentEncoding ?? correctedProgressJson - _ = try? await message.webView?.evaluateJavaScript("markProblemCompleted('\(correctedProgressJson)')") + _ = message.webView?.evaluateJavaScript("markProblemCompleted('\(correctedProgressJson)')") { _ ,_ in } } else if let offlineProgress = await persistence.loadProgress(for: blockID) { var correctedProgressJson = offlineProgress.progressJson correctedProgressJson = correctedProgressJson.removingPercentEncoding ?? correctedProgressJson - _ = try? await message.webView?.evaluateJavaScript("markProblemCompleted('\(correctedProgressJson)')") + _ = message.webView?.evaluateJavaScript("markProblemCompleted('\(correctedProgressJson)')") { _ ,_ in } } }