Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inhibit new version nag if postpone is pressed #7102

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/tribler/gui/tribler_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def __init__(
self.create_dialog = None
self.chosen_dir = None
self.new_version_dialog = None
self.new_version_dialog_postponed = False
self.start_download_dialog_active = False
self.selected_torrent_files = []
self.start_time = time.time()
Expand Down Expand Up @@ -732,6 +733,8 @@ def on_add_button_pressed(channel_id):
def on_new_version_available(self, version):
if version == str(self.gui_settings.value('last_reported_version')):
return
if self.new_version_dialog_postponed:
return

# To prevent multiple dialogs on top of each other,
# close any existing dialog first.
Expand All @@ -752,6 +755,8 @@ def on_new_version_available(self, version):
def on_new_version_dialog_done(self, version, action):
if action == 0: # ignore
self.gui_settings.setValue("last_reported_version", version)
elif action == 1: # postpone
self.new_version_dialog_postponed = True
elif action == 2: # ok
import webbrowser

Expand Down