mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fix some warnings. (#3416)
This commit is contained in:
@@ -213,14 +213,20 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
}
|
||||
|
||||
private func postMessageToWidget(_ message: ElementCallWidgetMessage) async {
|
||||
let data: Data
|
||||
do {
|
||||
let data = try JSONEncoder().encode(message)
|
||||
let json = String(decoding: data, as: UTF8.self)
|
||||
|
||||
await postJSONToWidget(json)
|
||||
data = try JSONEncoder().encode(message)
|
||||
} catch {
|
||||
MXLog.error("Failed encoding widget message with error: \(error)")
|
||||
return
|
||||
}
|
||||
|
||||
guard let json = String(data: data, encoding: .utf8) else {
|
||||
MXLog.error("Invalid data for widget message")
|
||||
return
|
||||
}
|
||||
|
||||
await postJSONToWidget(json)
|
||||
}
|
||||
|
||||
private func postJSONToWidget(_ json: String) async {
|
||||
|
||||
@@ -93,7 +93,7 @@ class CreateRoomViewModel: CreateRoomViewModelType, CreateRoomViewModelProtocol
|
||||
old.roomName == new.roomName && old.roomTopic == new.roomTopic && old.isRoomPrivate == new.isRoomPrivate
|
||||
}
|
||||
.sink { [weak self] bindings in
|
||||
guard let self = self else { return }
|
||||
guard let self else { return }
|
||||
updateParameters(bindings: bindings)
|
||||
actionsSubject.send(.updateDetails(createRoomParameters))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user