Reset the ToggleHistory indicator count/label when a share starts. Add a test for this

This commit is contained in:
Miguel Jacq 2019-09-03 17:02:00 +10:00
parent aac77ef425
commit 7a6d34103d
5 changed files with 10 additions and 0 deletions

View file

@ -212,6 +212,8 @@ class ReceiveMode(Mode):
Set the info counters back to zero.
"""
self.history.reset()
self.toggle_history.indicator_count = 0
self.toggle_history.update_indicator()
def update_primary_action(self):
self.common.log('ReceiveMode', 'update_primary_action')

View file

@ -334,6 +334,8 @@ class ShareMode(Mode):
Set the info counters back to zero.
"""
self.history.reset()
self.toggle_history.indicator_count = 0
self.toggle_history.update_indicator()
@staticmethod
def _compute_total_size(filenames):

View file

@ -258,6 +258,8 @@ class WebsiteMode(Mode):
Set the info counters back to zero.
"""
self.history.reset()
self.toggle_history.indicator_count = 0
self.toggle_history.update_indicator()
@staticmethod
def _compute_total_size(filenames):