diff --git a/Meshtastic/Views/Messages/ChannelMessageList.swift b/Meshtastic/Views/Messages/ChannelMessageList.swift index 5102099f..1c1a1921 100644 --- a/Meshtastic/Views/Messages/ChannelMessageList.swift +++ b/Meshtastic/Views/Messages/ChannelMessageList.swift @@ -130,6 +130,9 @@ struct ChannelMessageList: View { .defaultScrollAnchorTopAlignment() .defaultScrollAnchorBottomSizeChanges() .scrollDismissesKeyboard(.immediately) + .onFirstAppear { + debouncedScrollToBottom(scrollView: scrollView, lastMessageId: lastMessageId, delay: 0.1) + } .onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in // Keyboard is about to appear: keyboard show animation hasn't quite started yet. // Schedule an immediate scroll to the bottom message by its messageId, in order to force LazyVStack to render that cell if it isn't rendered already diff --git a/Meshtastic/Views/Messages/UserMessageList.swift b/Meshtastic/Views/Messages/UserMessageList.swift index 4e9c6881..09766c32 100644 --- a/Meshtastic/Views/Messages/UserMessageList.swift +++ b/Meshtastic/Views/Messages/UserMessageList.swift @@ -128,6 +128,9 @@ struct UserMessageList: View { .defaultScrollAnchorTopAlignment() .defaultScrollAnchorBottomSizeChanges() .scrollDismissesKeyboard(.immediately) + .onFirstAppear { + debouncedScrollToBottom(scrollView: scrollView, lastMessageId: lastMessageId, delay: 0.1) + } .onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in // Keyboard is about to appear: keyboard show animation hasn't quite started yet. // Schedule an immediate scroll to the bottom message by its messageId, in order to force LazyVStack to render that cell if it isn't rendered already