mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-14 05:31:25 -05:00
Merge pull request #755 from mig5/upload_icon_updating
Increment/decrement the upload counters
This commit is contained in:
commit
31cdac46c6
@ -166,6 +166,12 @@ class ReceiveMode(Mode):
|
||||
Handle REQUEST_UPLOAD_FINISHED event.
|
||||
"""
|
||||
self.uploads.finished(event["data"]["id"])
|
||||
# Update the total 'completed uploads' info
|
||||
self.uploads_completed += 1
|
||||
self.update_uploads_completed()
|
||||
# Update the 'in progress uploads' info
|
||||
self.uploads_in_progress -= 1
|
||||
self.update_uploads_in_progress()
|
||||
|
||||
def on_reload_settings(self):
|
||||
"""
|
||||
@ -187,7 +193,7 @@ class ReceiveMode(Mode):
|
||||
|
||||
def update_uploads_completed(self):
|
||||
"""
|
||||
Update the 'Downloads completed' info widget.
|
||||
Update the 'Uploads completed' info widget.
|
||||
"""
|
||||
if self.uploads_completed == 0:
|
||||
image = self.common.get_resource_path('images/share_completed_none.png')
|
||||
@ -198,7 +204,7 @@ class ReceiveMode(Mode):
|
||||
|
||||
def update_uploads_in_progress(self):
|
||||
"""
|
||||
Update the 'Downloads in progress' info widget.
|
||||
Update the 'Uploads in progress' info widget.
|
||||
"""
|
||||
if self.uploads_in_progress == 0:
|
||||
image = self.common.get_resource_path('images/share_in_progress_none.png')
|
||||
|
Loading…
x
Reference in New Issue
Block a user