Skip to content

Commit

Permalink
Eliminate erratic conversation deletion marker placement
Browse files Browse the repository at this point in the history
ConversationView.scroll was still shown after conversation deletion,
though empty, and was throwing off the placement of the marker.
  • Loading branch information
rmol committed Jun 30, 2021
1 parent 17aaab1 commit 8128663
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 @@ -3469,6 +3469,7 @@ def __init__(self):
layout.addStretch()
layout.addWidget(deletion_message)
layout.addWidget(tear)
layout.addStretch()

self.setLayout(layout)

Expand Down Expand Up @@ -3521,11 +3522,13 @@ def __init__(self, source_db_object: Source, controller: Controller):

def update_deletion_markers(self, collection):
if collection:
self.scroll.show()
if collection[0].file_counter > 1:
self.deleted_conversation_marker.hide()
self.deleted_conversation_items_marker.show()
elif self.source.interaction_count > 0:
self.deleted_conversation_items_marker.hide()
self.scroll.hide()
self.deleted_conversation_marker.show()

def update_conversation(self, collection: list) -> None:
Expand Down

0 comments on commit 8128663

Please sign in to comment.