diff options
author | Micah Lee <micah@micahflee.com> | 2019-09-03 22:20:52 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2019-09-03 22:20:52 -0700 |
commit | dee9e40051259509ffc23ab1dc5810a02b6a0f89 (patch) | |
tree | 330367a0b1a27c49ffc117a645c39ab21d46ddeb | |
parent | ffe12bdeada15295ab452293308b70f778e711f3 (diff) | |
download | onionshare-dee9e40051259509ffc23ab1dc5810a02b6a0f89.tar.gz onionshare-dee9e40051259509ffc23ab1dc5810a02b6a0f89.zip |
Rename a few more count variables to cur_history_id
-rw-r--r-- | onionshare/__init__.py | 4 | ||||
-rw-r--r-- | onionshare_gui/mode/receive_mode/__init__.py | 4 | ||||
-rw-r--r-- | onionshare_gui/mode/share_mode/__init__.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/onionshare/__init__.py b/onionshare/__init__.py index 0003106f..7e7798f8 100644 --- a/onionshare/__init__.py +++ b/onionshare/__init__.py @@ -262,12 +262,12 @@ def main(cwd=None): if not app.autostop_timer_thread.is_alive(): if mode == 'share' or (mode == 'website'): # If there were no attempts to download the share, or all downloads are done, we can stop - if web.share_mode.download_count == 0 or web.done: + if web.share_mode.cur_history_id == 0 or web.done: print("Stopped because auto-stop timer ran out") web.stop(app.port) break if mode == 'receive': - if web.receive_mode.upload_count == 0 or not web.receive_mode.uploads_in_progress: + if web.receive_mode.cur_history_id == 0 or not web.receive_mode.uploads_in_progress: print("Stopped because auto-stop timer ran out") web.stop(app.port) break diff --git a/onionshare_gui/mode/receive_mode/__init__.py b/onionshare_gui/mode/receive_mode/__init__.py index 0010fbd2..ecbfa54a 100644 --- a/onionshare_gui/mode/receive_mode/__init__.py +++ b/onionshare_gui/mode/receive_mode/__init__.py @@ -97,7 +97,7 @@ class ReceiveMode(Mode): The auto-stop timer expired, should we stop the server? Returns a bool """ # If there were no attempts to upload files, or all uploads are done, we can stop - if self.web.receive_mode.upload_count == 0 or not self.web.receive_mode.uploads_in_progress: + if self.web.receive_mode.cur_history_id == 0 or not self.web.receive_mode.uploads_in_progress: self.server_status.stop_server() self.server_status_label.setText(strings._('close_on_autostop_timer')) return True @@ -112,7 +112,7 @@ class ReceiveMode(Mode): Starting the server. """ # Reset web counters - self.web.receive_mode.upload_count = 0 + self.web.receive_mode.cur_history_id = 0 self.web.reset_invalid_passwords() # Hide and reset the uploads if we have previously shared diff --git a/onionshare_gui/mode/share_mode/__init__.py b/onionshare_gui/mode/share_mode/__init__.py index b5da0cd3..35a2045d 100644 --- a/onionshare_gui/mode/share_mode/__init__.py +++ b/onionshare_gui/mode/share_mode/__init__.py @@ -132,7 +132,7 @@ class ShareMode(Mode): The auto-stop timer expired, should we stop the server? Returns a bool """ # If there were no attempts to download the share, or all downloads are done, we can stop - if self.web.share_mode.download_count == 0 or self.web.done: + if self.web.share_mode.cur_history_id == 0 or self.web.done: self.server_status.stop_server() self.server_status_label.setText(strings._('close_on_autostop_timer')) return True @@ -146,7 +146,7 @@ class ShareMode(Mode): Starting the server. """ # Reset web counters - self.web.share_mode.download_count = 0 + self.web.share_mode.cur_history_id = 0 self.web.reset_invalid_passwords() # Hide and reset the downloads if we have previously shared |