mirror of
https://github.com/NicolasConstant/sengi
synced 2025-02-08 16:08:40 +01:00
added loading animation
This commit is contained in:
parent
52f5aa69df
commit
7ee5cdb4f1
@ -14,7 +14,7 @@
|
||||
(browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)">
|
||||
</app-notification>
|
||||
</div>
|
||||
|
||||
<app-waiting-animation *ngIf="isNotificationsLoading" class="waiting-icon"></app-waiting-animation>
|
||||
</div>
|
||||
<div [class.notifications__elements__wrapper--selected]="displayingMentions"
|
||||
class="notifications__elements__wrapper flexcroll" #mentionstream (scroll)="onScroll()" tabindex="0">
|
||||
@ -23,6 +23,7 @@
|
||||
(browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)">
|
||||
</app-notification>
|
||||
</div>
|
||||
<app-waiting-animation *ngIf="isMentionsLoading" class="waiting-icon"></app-waiting-animation>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -44,7 +44,7 @@ export class StreamNotificationsComponent implements OnInit, OnDestroy {
|
||||
mentionsMaxReached: boolean;
|
||||
lastMentionId: string;
|
||||
|
||||
isNotificationsLoading: boolean;
|
||||
isNotificationsLoading: boolean = true;
|
||||
notificationsMaxReached: boolean;
|
||||
lastNotificationId: string;
|
||||
|
||||
@ -124,11 +124,13 @@ export class StreamNotificationsComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.mastodonService.getNotifications(this.account, null, null, null, 10)
|
||||
.then((notifications: Notification[]) => {
|
||||
this.notifications = notifications.map(x => new NotificationWrapper(x, this.account));
|
||||
this.isNotificationsLoading = false;
|
||||
|
||||
this.notifications = notifications.map(x => new NotificationWrapper(x, this.account));
|
||||
this.lastNotificationId = this.notifications[this.notifications.length - 1].notification.id;
|
||||
})
|
||||
.catch(err => {
|
||||
this.isNotificationsLoading = false;
|
||||
})
|
||||
.then(() => {
|
||||
let streamElement = new StreamElement(StreamTypeEnum.personnal, 'activity', this.account.id, null, null, null, this.account.instance);
|
||||
|
Loading…
x
Reference in New Issue
Block a user