limit displayable accounts to 5
This commit is contained in:
parent
11ae5cb42b
commit
3079a93574
|
@ -44,11 +44,18 @@ export class SearchComponent implements OnInit {
|
||||||
if (enabledAccounts.length > 0) {
|
if (enabledAccounts.length > 0) {
|
||||||
const candid_oneAccount = enabledAccounts[0];
|
const candid_oneAccount = enabledAccounts[0];
|
||||||
this.mastodonService.search(candid_oneAccount, data)
|
this.mastodonService.search(candid_oneAccount, data)
|
||||||
.then((results: Results)=> {
|
.then((results: Results) => {
|
||||||
console.warn(results);
|
if (results) {
|
||||||
this.accounts = results.accounts;
|
console.warn(results);
|
||||||
this.statuses = results.statuses;
|
this.accounts = results.accounts;
|
||||||
this.hashtags = results.hashtags;
|
//this.statuses = results.statuses;
|
||||||
|
this.hashtags = results.hashtags;
|
||||||
|
|
||||||
|
//TODO: Pleroma return more than mastodon, will have to handle that
|
||||||
|
if (this.accounts.length > 5) {
|
||||||
|
this.accounts.length = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => console.error(err));
|
.catch((err) => console.error(err));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue