better migrated account opening

This commit is contained in:
Nicolas Constant 2019-08-06 20:16:10 -04:00
parent e77858e021
commit 985513335e
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 7 additions and 2 deletions

View File

@ -41,7 +41,7 @@
<div class="profile__moved" *ngIf="displayedAccount && displayedAccount.moved"> <div class="profile__moved" *ngIf="displayedAccount && displayedAccount.moved">
{{displayedAccount | accountEmoji }} has moved to <a href {{displayedAccount | accountEmoji }} has moved to <a href
(click)="browseAccount(displayedAccount.moved.acct)" class="profile__moved--link" (click)="openMigratedAccount(displayedAccount.moved)" class="profile__moved--link"
title="open @{{displayedAccount.moved.acct }}">@{{displayedAccount.moved.acct }}</a> title="open @{{displayedAccount.moved.acct }}">@{{displayedAccount.moved.acct }}</a>
</div> </div>

View File

@ -210,8 +210,13 @@ export class UserProfileComponent implements OnInit {
this.load(this.lastAccountName); this.load(this.lastAccountName);
} }
browseAccount(accountName: string): boolean { browseAccount(accountName: string): void {
this.browseAccountEvent.next(accountName); this.browseAccountEvent.next(accountName);
}
openMigratedAccount(account: Account): boolean {
const handle = this.toolsService.getAccountFullHandle(account);
this.browseAccount(handle);
return false; return false;
} }