mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 18:52:58 -03:00
ReceiveMode was overloading timer_callback instead of timer_callback_custom
This commit is contained in:
parent
74a799f0c1
commit
c1413ad7da
2 changed files with 7 additions and 9 deletions
|
@ -86,15 +86,10 @@ class Mode(QtWidgets.QWidget):
|
||||||
"""
|
"""
|
||||||
This method is called regularly on a timer.
|
This method is called regularly on a timer.
|
||||||
"""
|
"""
|
||||||
self.common.log('Mode', 'timer_callback')
|
|
||||||
# If the auto-shutdown timer has stopped, stop the server
|
# If the auto-shutdown timer has stopped, stop the server
|
||||||
print(self.server_status.status) ## HERE IS THE PROBLEM, self.server_status.status isn't getting updated
|
|
||||||
if self.server_status.status == ServerStatus.STATUS_STARTED:
|
if self.server_status.status == ServerStatus.STATUS_STARTED:
|
||||||
print('debug1')
|
|
||||||
if self.app.shutdown_timer and self.common.settings.get('shutdown_timeout'):
|
if self.app.shutdown_timer and self.common.settings.get('shutdown_timeout'):
|
||||||
print('debug2')
|
|
||||||
if self.timeout > 0:
|
if self.timeout > 0:
|
||||||
print('debug3')
|
|
||||||
now = QtCore.QDateTime.currentDateTime()
|
now = QtCore.QDateTime.currentDateTime()
|
||||||
seconds_remaining = now.secsTo(self.server_status.timeout)
|
seconds_remaining = now.secsTo(self.server_status.timeout)
|
||||||
|
|
||||||
|
|
|
@ -51,12 +51,15 @@ class ReceiveMode(Mode):
|
||||||
|
|
||||||
# Layout
|
# Layout
|
||||||
self.layout.insertWidget(0, self.receive_info)
|
self.layout.insertWidget(0, self.receive_info)
|
||||||
|
|
||||||
def timer_callback(self):
|
def timer_callback_custom(self):
|
||||||
"""
|
"""
|
||||||
This method is called regularly on a timer while receive mode is active.
|
This method is called regularly on a timer while share mode is active.
|
||||||
"""
|
"""
|
||||||
pass
|
# Scroll to the bottom of the download progress bar log pane if a new download has been added
|
||||||
|
#if self.new_download:
|
||||||
|
# self.downloads.downloads_container.vbar.setValue(self.downloads.downloads_container.vbar.maximum())
|
||||||
|
# self.new_download = False
|
||||||
|
|
||||||
def get_stop_server_shutdown_timeout_text(self):
|
def get_stop_server_shutdown_timeout_text(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue