mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 04:20:30 +00:00
rip
This commit is contained in:
parent
08ea80e4d2
commit
16707c01db
1 changed files with 2 additions and 3 deletions
|
|
@ -107,11 +107,10 @@ struct ConsoleLogsView: View {
|
|||
// This gives a small buffer for slight scroll movements
|
||||
isAtBottom = offset > -20
|
||||
}
|
||||
.onChange(of: logManager.logs) { newLogs in
|
||||
// Only auto-scroll if we're already at the bottom
|
||||
.onChange(of: logManager.logs.count) { _ in
|
||||
if isAtBottom {
|
||||
withAnimation {
|
||||
if let lastLog = newLogs.last {
|
||||
if let lastLog = logManager.logs.last {
|
||||
proxy.scrollTo(lastLog.id, anchor: .bottom)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue