From f4e4a61192be34858c158fa63a0d9da40028b2a3 Mon Sep 17 00:00:00 2001 From: cheykrym Date: Thu, 11 Dec 2025 20:42:26 +0300 Subject: [PATCH] fix msg --- yobble/Views/Chat/PrivateChatView.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yobble/Views/Chat/PrivateChatView.swift b/yobble/Views/Chat/PrivateChatView.swift index b5c7ecc..257354f 100644 --- a/yobble/Views/Chat/PrivateChatView.swift +++ b/yobble/Views/Chat/PrivateChatView.swift @@ -36,8 +36,9 @@ struct PrivateChatView: View { ZStack(alignment: .bottomTrailing) { content .onChange(of: viewModel.messages.count) { _ in - guard !viewModel.isLoadingMore else { return } - scrollToBottom(proxy: proxy) + if isBottomAnchorVisible { + scrollToBottom(proxy: proxy) + } } .onChange(of: scrollToBottomTrigger) { _ in scrollToBottom(proxy: proxy)