Added an autocomplete dropdown to the search bar

Этот коммит содержится в:
hmhealey
2015-10-20 16:50:55 -04:00
родитель a7852a4810
Коммит 4a1f6ad2a9
3 изменённых файлов: 178 добавлений и 0 удалений

Просмотреть файл

@@ -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;