Compare commits
2 commits
76ebe0f771
...
71468f02f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71468f02f2 | ||
|
|
6c404ba7fd |
2 changed files with 16 additions and 2 deletions
|
|
@ -38,9 +38,16 @@ struct ChatBufferView: View {
|
|||
}
|
||||
.padding()
|
||||
}
|
||||
.onChange(of: isInputFocused) { _, focused in
|
||||
if focused, let last = messages.last {
|
||||
proxy.scrollTo(last.persistentModelID, anchor: .bottom)
|
||||
}
|
||||
}
|
||||
.onChange(of: messages.count) {
|
||||
guard let last = messages.last, last.sessionId == manager.sessionId else { return }
|
||||
Task { @MainActor in
|
||||
proxy.scrollTo(last.persistentModelID, anchor: .bottom)
|
||||
}
|
||||
|
||||
let isActive = bufferName == manager.activeBuffer
|
||||
let playBackground = UserDefaults.standard.bool(forKey: "sounds_background_buffers", default: true)
|
||||
|
|
|
|||
|
|
@ -34,9 +34,16 @@ struct DMConversationView: View {
|
|||
}
|
||||
.padding()
|
||||
}
|
||||
.onChange(of: isInputFocused) { _, focused in
|
||||
if focused, let last = messages.last {
|
||||
proxy.scrollTo(last.persistentModelID, anchor: .bottom)
|
||||
}
|
||||
}
|
||||
.onChange(of: messages.count) {
|
||||
guard let last = messages.last, last.sessionId == manager.sessionId else { return }
|
||||
Task { @MainActor in
|
||||
proxy.scrollTo(last.persistentModelID, anchor: .bottom)
|
||||
}
|
||||
|
||||
// Sound
|
||||
if UserDefaults.standard.bool(forKey: "sounds_enabled", default: true),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue