Preserve typing events in iOS FFI

This commit is contained in:
Mikhail Kilin
2026-05-21 00:41:18 +03:00
parent b3b02835b6
commit 928a5aeda2
6 changed files with 80 additions and 2 deletions

View File

@@ -155,6 +155,15 @@ public actor UniFfiSessionBridge: SessionBridge {
}
}
private static func mapTypingState(_ state: IosTypingState) -> TypingState {
switch state {
case .idle:
.idle
case let .typing(chatId, userId, text):
.typing(chatId: chatId, userId: userId, text: text)
}
}
private static func mapFolder(_ folder: IosFolder) -> Folder {
Folder(id: folder.id, name: folder.name)
}
@@ -236,6 +245,8 @@ public actor UniFfiSessionBridge: SessionBridge {
)
case let .networkChanged(state):
.networkChanged(mapNetworkState(state))
case let .typingChanged(state):
.typingChanged(mapTypingState(state))
case let .draftChanged(draft):
.draftChanged(mapDraft(draft))
case let .profileLoaded(profile):