zulip-terminal
zulip-terminal copied to clipboard
[WIP] - Make UsersView consistent with other Views (Streams/Topic)
- Make UsersView a
urwid.Frame
and RightColumnView aurwid.Pile
object. This change would be helpful in future if we decide to add buddy PM toRightColumnView
as well. - Move initializing
UserSearchbar
intoUsersView.__init__
. This is the header of a listbox. - Move
update_user_list
intoUsersView
. Use a slightly different logic to set contents in Frame after we update the order. - Extract
build_user_view
function inRightColumnView
which builds the user button list and returns it. This is called fromusers_view
once during initialization and subsequently fromupdate_user_list
at 60-sec intervals. - An old conditional
reset_default_view_users
is now removed as we clearly distinguish between init call and subsequent list update calls. - Keypress logic has been introduced to
UsersView
. This mimicsStreamsView.keypress
. SEARCH_PEOPLE AND GO_BACK are handled here. - The updating call from
model.py
at 60-second intervals has been modified.
Heads up @sumanthvrao, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master
branch and resolve your pull request's merge conflicts accordingly.