Skip to content

Commit

Permalink
fix scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
guinmoon committed Sep 11, 2023
1 parent 6a56889 commit 5f7516e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LLMFarm/Chats/ChatView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ struct ChatView: View {
.onChange(of: aiChatModel.AI_typing){ ai_typing in
// .onChange(of: aiChatModel.messages.count){ count in
// Fix for theese https://developer.apple.com/forums/thread/712510
if #available(macOS 13.0, *){
#if os(macOS)
if (aiChatModel.predicting){
scrollToBottom(with_animation: true)
}else{
scrollToBottom(with_animation: false)
}
}
#endif
if #available(iOS 16.4, *){
if (aiChatModel.predicting){
scrollToBottom(with_animation: true)
Expand Down Expand Up @@ -176,9 +176,9 @@ struct ChatView: View {
.disabled(chat_selection == nil)
.onAppear(){
scrollProxy = scrollView
if #available(macOS 13.0, *){
#if os(macOS)
scrollToBottom(with_animation: false)
}
#endif
if #available(iOS 16.4, *) {
scrollToBottom(with_animation: false)
}
Expand Down

0 comments on commit 5f7516e

Please sign in to comment.