wip
This commit is contained in:
parent
441409e676
commit
8fb9ef52d8
|
@ -245,7 +245,7 @@ private extension AttachmentsStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
chatCancellable = ValueObservation.tracking(Chat
|
chatCancellable = ValueObservation.tracking(Chat
|
||||||
.filter(Column("bareJid") == roster.bareJid && Column("contactBareJid") == roster.contactBareJid)
|
.filter(Column("account") == roster.bareJid && Column("participant") == roster.contactBareJid)
|
||||||
.fetchOne
|
.fetchOne
|
||||||
)
|
)
|
||||||
.publisher(in: Database.shared.dbQueue, scheduling: .immediate)
|
.publisher(in: Database.shared.dbQueue, scheduling: .immediate)
|
||||||
|
|
|
@ -76,7 +76,7 @@ private extension MessagesStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
chatCancellable = ValueObservation.tracking(Chat
|
chatCancellable = ValueObservation.tracking(Chat
|
||||||
.filter(Column("bareJid") == roster.bareJid && Column("contactBareJid") == roster.contactBareJid)
|
.filter(Column("account") == roster.bareJid && Column("participant") == roster.contactBareJid)
|
||||||
.fetchOne
|
.fetchOne
|
||||||
)
|
)
|
||||||
.publisher(in: Database.shared.dbQueue, scheduling: .immediate)
|
.publisher(in: Database.shared.dbQueue, scheduling: .immediate)
|
||||||
|
|
|
@ -33,15 +33,14 @@ extension SettingsStore {
|
||||||
private extension SettingsStore {
|
private extension SettingsStore {
|
||||||
func subscribe() {
|
func subscribe() {
|
||||||
chatCancellable = ValueObservation.tracking(Chat
|
chatCancellable = ValueObservation.tracking(Chat
|
||||||
.filter(Column("bareJid") == roster.bareJid && Column("contactBareJid") == roster.contactBareJid)
|
.filter(Column("account") == roster.bareJid && Column("participant") == roster.contactBareJid)
|
||||||
.fetchOne
|
.fetchOne
|
||||||
)
|
)
|
||||||
.publisher(in: Database.shared.dbQueue, scheduling: .immediate)
|
.publisher(in: Database.shared.dbQueue, scheduling: .immediate)
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.sink { _ in
|
.sink { _ in
|
||||||
} receiveValue: { [weak self] chat in
|
} receiveValue: { [weak self] chat in
|
||||||
guard let self = self else { return }
|
self?.chat = chat
|
||||||
self.chat = chat
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,7 @@ struct ConversationSettingsScreen: View {
|
||||||
controlType: .switcher(isOn: Binding(
|
controlType: .switcher(isOn: Binding(
|
||||||
get: { settingsStore.chat?.encrypted ?? false },
|
get: { settingsStore.chat?.encrypted ?? false },
|
||||||
set: { new in
|
set: { new in
|
||||||
Task {
|
settingsStore.setSecured(new)
|
||||||
try? await settingsStore.chat?.setEncrypted(new)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
|
|
|
@ -56,7 +56,7 @@ targets:
|
||||||
# UIUserInterfaceStyle: Light
|
# UIUserInterfaceStyle: Light
|
||||||
CFBundleDisplayName: Conversations
|
CFBundleDisplayName: Conversations
|
||||||
CFBundleShortVersionString: "1.0.0"
|
CFBundleShortVersionString: "1.0.0"
|
||||||
CFBundleVersion: "5"
|
CFBundleVersion: "6"
|
||||||
sources:
|
sources:
|
||||||
- path: ConversationsClassic
|
- path: ConversationsClassic
|
||||||
excludes:
|
excludes:
|
||||||
|
|
Loading…
Reference in a new issue