mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-07 11:30:05 +00:00
chat: fix issues with the initial "New Chat" (#2330)
* select the existing new chat if there already is one when "New Chat" is clicked * scroll to the new chat when "New Chat" is clicked * fix the "New Chat" being scrolled past the top of the chat list Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -39,7 +39,8 @@ Rectangle {
|
||||
text: qsTr("\uFF0B New chat")
|
||||
Accessible.description: qsTr("Create a new chat")
|
||||
onClicked: {
|
||||
ChatListModel.addChat();
|
||||
ChatListModel.addChat()
|
||||
conversationList.positionViewAtIndex(0, ListView.Beginning)
|
||||
Network.trackEvent("new_chat", {"number_of_chats": ChatListModel.count})
|
||||
}
|
||||
}
|
||||
@@ -60,6 +61,9 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: 10
|
||||
model: ChatListModel
|
||||
|
||||
Component.onCompleted: ChatListModel.loadChats()
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
parent: conversationList.parent
|
||||
anchors.top: conversationList.top
|
||||
|
Reference in New Issue
Block a user