From 16707c01dbc7fcea71b8c3fa1dfeb0ec88348595 Mon Sep 17 00:00:00 2001 From: neoarz Date: Fri, 11 Apr 2025 11:59:06 -0400 Subject: [PATCH] rip --- StikJIT/Views/ConsoleLogsView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/StikJIT/Views/ConsoleLogsView.swift b/StikJIT/Views/ConsoleLogsView.swift index 3150419..19c9cf4 100644 --- a/StikJIT/Views/ConsoleLogsView.swift +++ b/StikJIT/Views/ConsoleLogsView.swift @@ -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) } }