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
@@ -7,6 +7,7 @@
import Combine
@MainActor
protocol SoftLogoutScreenViewModelProtocol {
var actions: AnyPublisher<SoftLogoutScreenViewModelAction, Never> { get }
var context: SoftLogoutScreenViewModelType.Context { get }
@@ -81,8 +81,8 @@ struct WebRegistrationWebView: UIViewRepresentable {
webView.load(URLRequest(url: url))
}
nonisolated func userContentController(_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage) {
func userContentController(_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage) {
guard let jsonString = message.body as? String, let jsonData = jsonString.data(using: .utf8) else {
MXLog.error("Unexpected response.")
return
@@ -94,7 +94,7 @@ struct WebRegistrationWebView: UIViewRepresentable {
}
MXLog.info("Received login credentials.")
Task { await viewModelContext.send(viewAction: .signedIn(credentials)) }
viewModelContext.send(viewAction: .signedIn(credentials))
}
// MARK: WKUIDelegate
@@ -120,8 +120,8 @@ struct WebRegistrationWebView: UIViewRepresentable {
// MARK: WKScriptMessageHandler
nonisolated func userContentController(_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage) {
func userContentController(_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage) {
coordinator?.userContentController(userContentController, didReceive: message)
}
}