mirror of
https://github.com/NicolasConstant/sengi
synced 2025-02-02 19:46:59 +01:00
don't add non-hashtag to search result, fix #283
This commit is contained in:
parent
8e5525741f
commit
b48e8e219e
@ -88,11 +88,11 @@ export class SearchComponent implements OnInit {
|
||||
})
|
||||
.then((results: Results) => {
|
||||
if (results) {
|
||||
this.accounts = results.accounts.slice(0, 5);
|
||||
this.accounts = results.accounts.slice(0, 7);
|
||||
this.hashtags = results.hashtags;
|
||||
|
||||
if(!this.hashtags.map(x => x.toLowerCase()).includes(data.toLowerCase())){
|
||||
this.hashtags.unshift(data);
|
||||
if(data && data[0] === '#' && !this.hashtags.map(x => x.toLowerCase()).includes(data.replace('#', '').toLowerCase())){
|
||||
this.hashtags.unshift(data.replace('#', ''));
|
||||
}
|
||||
|
||||
for (let status of results.statuses) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user