add unfound hashtag in search panel, fix #256

This commit is contained in:
Nicolas Constant 2020-04-18 17:45:29 -04:00
parent 3d16be26c5
commit c75245fabe
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ export class SearchComponent implements OnInit {
this.accounts = results.accounts.slice(0, 5);
this.hashtags = results.hashtags;
if(!this.hashtags.map(x => x.toLowerCase()).includes(data.toLowerCase())){
this.hashtags.unshift(data);
}
for (let status of results.statuses) {
let cwPolicy = this.toolsService.checkContentWarning(status);
const statusWrapper = new StatusWrapper(cwPolicy.status, this.lastAccountUsed, cwPolicy.applyCw, cwPolicy.hide);