Skip to content

Commit

Permalink
app: fix overlaid FileWidgets in conversation view
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Mar 16, 2020
1 parent c054e3e commit c37622d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2196,6 +2196,7 @@ def eventFilter(self, obj, event):

def _set_file_state(self):
if self.file.is_decrypted:
logger.debug('Changing file {} state to decrypted/downloaded'.format(self.uuid))
self._set_file_name()
self.download_button.hide()
self.no_file_name.hide()
Expand All @@ -2204,6 +2205,7 @@ def _set_file_state(self):
self.print_button.show()
self.file_name.show()
else:
logger.debug('Changing file {} state to not downloaded'.format(self.uuid))
self.download_button.setText(_('DOWNLOAD'))
# Ensure correct icon depending on mouse hover state.
if self.download_button.underMouse():
Expand Down Expand Up @@ -3005,6 +3007,7 @@ def update_conversation(self, collection: list) -> None:
for item_widget in current_conversation.values():
logger.debug('Deleting item: {}'.format(item_widget.uuid))
self.current_messages.pop(item_widget.uuid)
item_widget.deleteLater()
self.conversation_layout.removeWidget(item_widget)

def add_file(self, file: File, index):
Expand Down

0 comments on commit c37622d

Please sign in to comment.