Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70fe066cdd | |||
| c9431f62ef | |||
| b91f7fcfba | |||
| 58b25b0a44 | |||
| 01ed427b54 | |||
| 8fd37ec556 |
@@ -18,7 +18,7 @@ export class GridPage {
|
|||||||
tabNavEl: any;
|
tabNavEl: any;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public profileService: ProfileService, private _sanitizer: DomSanitizer) {
|
constructor(public navCtrl: NavController, public profileService: ProfileService, private _sanitizer: DomSanitizer) {
|
||||||
profileService.load().then((data) => {
|
profileService.loadVerified().then((data) => {
|
||||||
this.profiles = data;
|
this.profiles = data;
|
||||||
});
|
});
|
||||||
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
||||||
|
|||||||
@@ -67,16 +67,16 @@ export class ProfileService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getNextProfile(id, type) {
|
getNextProfile(id, type = 'all') {
|
||||||
var nextIdIndex = this.idMap[id] + 1;
|
var nextIdIndex = this.idMap[type][id] + 1;
|
||||||
nextIdIndex = nextIdIndex >= this.profiles.length ? 0 : nextIdIndex;
|
nextIdIndex = nextIdIndex >= this.profiles[type].length ? 0 : nextIdIndex;
|
||||||
return this.profiles[nextIdIndex];
|
return this.profiles[type][nextIdIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
getPreviousProfile(id, type) {
|
getPreviousProfile(id, type = 'all') {
|
||||||
var prevIdIndex = this.idMap[id] + 1;
|
var prevIdIndex = this.idMap[type][id] - 1;
|
||||||
prevIdIndex = prevIdIndex < 0 ? (this.profiles.length - 1) : prevIdIndex;
|
prevIdIndex = prevIdIndex < 0 ? (this.profiles[type].length - 1) : prevIdIndex;
|
||||||
return this.profiles[prevIdIndex];
|
return this.profiles[type][prevIdIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
getProfiles() {
|
getProfiles() {
|
||||||
|
|||||||
Reference in New Issue
Block a user