diff --git a/src/app/components/floating-column/manage-account/manage-account.component.html b/src/app/components/floating-column/manage-account/manage-account.component.html
index 37314bfb..2e52ec73 100644
--- a/src/app/components/floating-column/manage-account/manage-account.component.html
+++ b/src/app/components/floating-column/manage-account/manage-account.component.html
@@ -2,7 +2,9 @@
Manage Account
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/src/app/components/floating-column/manage-account/manage-account.component.ts b/src/app/components/floating-column/manage-account/manage-account.component.ts
index 9bd9ff5b..e8f6cab2 100644
--- a/src/app/components/floating-column/manage-account/manage-account.component.ts
+++ b/src/app/components/floating-column/manage-account/manage-account.component.ts
@@ -6,6 +6,10 @@ import { Subscription } from 'rxjs';
import { AccountWrapper } from '../../../models/account.models';
import { UserNotificationService, UserNotification } from '../../../services/user-notification.service';
import { OpenThreadEvent } from '../../../services/tools.service';
+import { MastodonService } from '../../../services/mastodon.service';
+import { Account } from "../../../services/models/mastodon.interfaces";
+import { NotificationService } from '../../../services/notification.service';
+import { AccountInfo } from '../../../states/accounts.state';
@Component({
@@ -25,6 +29,8 @@ export class ManageAccountComponent implements OnInit, OnDestroy {
hasNotifications = false;
hasMentions = false;
+ userAccount: Account;
+
@Output() browseAccountEvent = new EventEmitter();
@Output() browseHashtagEvent = new EventEmitter();
@Output() browseThreadEvent = new EventEmitter();
@@ -33,6 +39,7 @@ export class ManageAccountComponent implements OnInit, OnDestroy {
set account(acc: AccountWrapper) {
this._account = acc;
this.checkNotifications();
+ this.getUserUrl(acc.info);
}
get account(): AccountWrapper {
return this._account;
@@ -42,6 +49,8 @@ export class ManageAccountComponent implements OnInit, OnDestroy {
private _account: AccountWrapper;
constructor(
+ private readonly mastodonService: MastodonService,
+ private readonly notificationService: NotificationService,
private readonly userNotificationService: UserNotificationService) { }
ngOnInit() {
@@ -52,6 +61,16 @@ export class ManageAccountComponent implements OnInit, OnDestroy {
this.userNotificationServiceSub.unsubscribe();
}
+ private getUserUrl(account: AccountInfo){
+ this.mastodonService.retrieveAccountDetails(this.account.info)
+ .then((acc: Account) => {
+ this.userAccount = acc;
+ })
+ .catch(err => {
+ this.notificationService.notifyHttpError(err);
+ });
+ }
+
private checkNotifications(){
if(this.userNotificationServiceSub){
this.userNotificationServiceSub.unsubscribe();
diff --git a/src/app/models/account.models.ts b/src/app/models/account.models.ts
index c18f51bf..359e3d27 100644
--- a/src/app/models/account.models.ts
+++ b/src/app/models/account.models.ts
@@ -5,10 +5,6 @@ export class AccountWrapper {
constructor() {
}
-// id: number;
-// username: string;
-// display_name: string;
-
info: AccountInfo;
avatar: string;
}