Skip to content

Commit

Permalink
Fix highlighting selected contact widget with unread count
Browse files Browse the repository at this point in the history
  • Loading branch information
exquo committed Jun 21, 2021
1 parent 12c8816 commit 6a5ad02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scli
Original file line number Diff line number Diff line change
Expand Up @@ -2325,8 +2325,7 @@ class ContactsListWidget(ListBoxPlus):
self.move_item(w, pos_new, pos_in_prefilter)
self.focus_position = pos_new

def _highlight_selected_widget(self, selected_w):
selected_w.highlight = True
def _unhighlight_current_contact_widget(self, selected_w):
# Remove highlighting from the "current" (not for long) contact's widget.
current_contact = self._chats_data.current_contact
if current_contact is None or current_contact is selected_w.contact:
Expand All @@ -2345,8 +2344,9 @@ class ContactsListWidget(ListBoxPlus):
return
contact = focused_contact_w.contact
focused_contact_w.fail_mark_set = False
self._highlight_selected_widget(focused_contact_w)
self._unhighlight_current_contact_widget(focused_contact_w)
urwid.emit_signal(self, 'contact_selected', contact, focus_widget)
focused_contact_w.highlight = True

def select_next_contact(self, reverse=False):
current_contact = self._chats_data.current_contact
Expand Down

0 comments on commit 6a5ad02

Please sign in to comment.