refactor: Split build_user_sidebar() from update_users().

Activity.update_users() is still used to handle partial
updates of users in the buddy list, but now all the places
that want to re-build the whole widget go through
build_user_sidebar().
This commit is contained in:
Steve Howell
2017-02-20 15:53:08 -08:00
parent 2566a89f81
commit 2aa7d20a51
2 changed files with 40 additions and 22 deletions

View File

@@ -296,7 +296,7 @@ activity.presence_info[mark.user_id] = { status: activity.IDLE };
activity.presence_info[norbert.user_id] = { status: activity.ACTIVE };
(function test_presence_list_full_update() {
var users = activity.update_users();
var users = activity.build_user_sidebar();
assert.deepEqual(users, [{
name: 'Fred Flintstone',
href: '#narrow/pm-with/2-fred',