On a fresh share, delete any download progress bars of previous shares, and re-hide the downloads container

This commit is contained in:
Miguel Jacq 2017-05-31 17:35:16 +10:00
parent a9ee14551b
commit 3b359aec62
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
2 changed files with 15 additions and 0 deletions

View file

@ -94,6 +94,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.downloads_container.setWidget(self.downloads)
self.downloads_container.setWidgetResizable(True)
self.downloads_container.setMaximumHeight(200)
self.downloads_container.setMinimumHeight(75)
self.vbar = self.downloads_container.verticalScrollBar()
self.downloads_container.hide() # downloads start out hidden
self.new_download = False
@ -233,6 +234,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.app.set_stealth(self.settings.get('use_stealth'))
# Hide and reset the downloads if we have previously shared
self.downloads_container.hide()
self.downloads.reset_downloads()
# Reset web counters
web.download_count = 0
web.error404_count = 0