Merge branch 'release/2.0.5'

This commit is contained in:
2018-05-29 19:13:49 -04:00
2 changed files with 6 additions and 6 deletions

View File

@@ -5,7 +5,6 @@ import { NavController } from 'ionic-angular';
import { ChatPage } from '../chat/chat';
import { ProfileService } from '../../services/profiles';
import { ProfilePage } from '../profile/profile';
import { TellYourStoryPage } from '../tell/tell';
@Component({
selector: 'page-grid',
@@ -20,6 +19,7 @@ export class GridPage {
constructor(public navCtrl: NavController, public profileService: ProfileService, private _sanitizer: DomSanitizer) {
profileService.loadVerified().then((data) => {
this.profiles = data;
console.debug('profiles: ', this.profiles);
});
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
}

View File

@@ -53,7 +53,7 @@ export class ProfileService {
.map(res => res.json())
.subscribe(
data => {
this.profiles = {};
this.profiles = this.profiles || {};
this.profiles[type] = data;
this.profiles[type].reduce((map, profile, i) => {
map[profile._id] = i;
@@ -62,7 +62,7 @@ export class ProfileService {
resolve(this.profiles[type]);
},
error => {
this.doGetRequest(this.fallback, resolve);
this.doGetRequest(this.fallback, resolve, type);
}
)
}
@@ -80,7 +80,7 @@ export class ProfileService {
}
getProfiles() {
return this.profiles;
return this.profiles.all;
}
getProfileById(id) {
@@ -88,10 +88,10 @@ export class ProfileService {
}
getSubmittedProfiles() {
return this.profiles.submitted;
}
getVerifiedProfiles() {
return this.profiles.verified;
}
}