summaryrefslogtreecommitdiffstats
path: root/web/react/stores
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-10-20 16:50:55 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-10-23 13:05:37 -0400
commit4a1f6ad2a972bb0f30414db3dc1899d88a01d29b (patch)
treee6d9daec4cc39974c7ca5be9d65ad20218d4d8cf /web/react/stores
parenta7852a4810b26436cd9ab952d013d610d9d8ec6b (diff)
downloadchat-4a1f6ad2a972bb0f30414db3dc1899d88a01d29b.tar.gz
chat-4a1f6ad2a972bb0f30414db3dc1899d88a01d29b.tar.bz2
chat-4a1f6ad2a972bb0f30414db3dc1899d88a01d29b.zip
Added an autocomplete dropdown to the search bar
Diffstat (limited to 'web/react/stores')
-rw-r--r--web/react/stores/user_store.jsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx
index 575e6d51e..e3e1944ce 100644
--- a/web/react/stores/user_store.jsx
+++ b/web/react/stores/user_store.jsx
@@ -48,6 +48,7 @@ class UserStoreClass extends EventEmitter {
this.getProfilesUsernameMap = this.getProfilesUsernameMap.bind(this);
this.getProfiles = this.getProfiles.bind(this);
this.getActiveOnlyProfiles = this.getActiveOnlyProfiles.bind(this);
+ this.getActiveOnlyProfileList = this.getActiveOnlyProfileList.bind(this);
this.saveProfile = this.saveProfile.bind(this);
this.setSessions = this.setSessions.bind(this);
this.getSessions = this.getSessions.bind(this);
@@ -215,6 +216,17 @@ class UserStoreClass extends EventEmitter {
return active;
}
+ getActiveOnlyProfileList() {
+ const profileMap = this.getActiveOnlyProfiles();
+ const profiles = [];
+
+ for (const id in profileMap) {
+ profiles.push(profileMap[id]);
+ }
+
+ return profiles;
+ }
+
saveProfile(profile) {
var ps = this.getProfiles();
ps[profile.id] = profile;