Skip to content

Commit

Permalink
Only show (Save changes?) dialog when you change the url
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffser committed May 16, 2024
1 parent 529687f commit 425e1b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ def closing_connection_dialog_response(self, dialog, task):


def closing_connection_dialog(self, dialog):
if self.ollama_url is None: self.destroy()
if self.ollama_url == self.connection_url_entry.get_text():
self.connection_dialog.force_close()
if self.ollama_url is None or self.verify_connection() == False:
self.show_connection_dialog(True)
self.show_toast("error", 1, self.connection_overlay)
return
dialog = Adw.AlertDialog(
heading=f"Save Changes?",
body=f"Do you want to save the URL change?",
Expand Down

0 comments on commit 425e1b0

Please sign in to comment.