aboutsummaryrefslogtreecommitdiff
path: root/src/windows/data_fetcher.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows/data_fetcher.py')
-rw-r--r--src/windows/data_fetcher.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/windows/data_fetcher.py b/src/windows/data_fetcher.py
index 212c1d7..b081b8d 100644
--- a/src/windows/data_fetcher.py
+++ b/src/windows/data_fetcher.py
@@ -56,7 +56,11 @@ class DataDownloader:
self.headers = {**headers, **{'Authorization': f"bearer {self.token}"}}
def on_closing(self):
- pass
+ if self.downloaded < self.posts_per_subreddit * len(self.subreddits):
+ if tkinter.messagebox.askokcancel('Quit', 'Are you sure you want to quit?'):
+ self.root.destroy()
+ else:
+ self.root.destroy()
def download(self):
for subreddit in self.subreddits: