mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-06 15:32:20 +00:00
simplify
This commit is contained in:
@@ -526,13 +526,12 @@ final class ChatModel: ObservableObject {
|
||||
}
|
||||
|
||||
func updateCurrentUserUiThemes(uiThemes: ThemeModeOverrides?) {
|
||||
guard var current = currentUser, current.uiThemes != uiThemes else { return }
|
||||
current.uiThemes = uiThemes
|
||||
let i = users.firstIndex(where: { $0.user.userId == current.userId })
|
||||
if let i {
|
||||
users[i].user = current
|
||||
if currentUser?.uiThemes != uiThemes {
|
||||
currentUser?.uiThemes = uiThemes
|
||||
if let i = users.firstIndex(where: { $0.user.userId == currentUser?.userId }) {
|
||||
users[i].user.uiThemes = uiThemes
|
||||
}
|
||||
}
|
||||
currentUser = current
|
||||
}
|
||||
|
||||
func addLiveDummy(_ chatInfo: ChatInfo) -> ChatItem {
|
||||
|
||||
Reference in New Issue
Block a user