Fix some concurrency warnings, update missed licence headers. (#3741)

* Switch the TimelineController to an async sequence and fix the warnings on the UserIndicatorController
This commit is contained in:
Stefan Ceriu
2025-02-06 11:35:23 +02:00
committed by GitHub
parent f86a5a2bb9
commit 922ebf47e6
22 changed files with 129 additions and 184 deletions
@@ -152,11 +152,8 @@ private struct CallView: UIViewRepresentable {
}
}
nonisolated func userContentController(_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage) {
Task { @MainActor [weak self] in
self?.viewModelContext?.javaScriptMessageHandler?(message.body)
}
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
viewModelContext?.javaScriptMessageHandler?(message.body)
}
// MARK: - WKUIDelegate
@@ -191,10 +188,8 @@ private struct CallView: UIViewRepresentable {
return .cancel
}
nonisolated func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
Task { @MainActor in
viewModelContext?.send(viewAction: .urlChanged(webView.url))
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
viewModelContext?.send(viewAction: .urlChanged(webView.url))
}
// MARK: - Picture in Picture
@@ -271,8 +266,7 @@ private struct CallView: UIViewRepresentable {
// MARK: - WKScriptMessageHandler
nonisolated func userContentController(_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage) {
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
coordinator?.userContentController(userContentController, didReceive: message)
}
}