notify edited boosted status, fix #542
This commit is contained in:
parent
89c5c33de2
commit
7a8dfd0c6b
@ -22,7 +22,7 @@
|
||||
(click)="acceptFollowRequest()">
|
||||
<fa-icon class="follow_request__icon" [icon]="faCheck"></fa-icon>
|
||||
</a>
|
||||
<a href title="Reject" class="follow_request__link follow_request__link--cross"
|
||||
<a href title="Reject" class="follow_request__link follow_request__link--cross"
|
||||
(click)="refuseFollowRequest()">
|
||||
<fa-icon class="follow_request__icon" [icon]="faTimes"></fa-icon>
|
||||
</a>
|
||||
@ -69,12 +69,18 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<app-status *ngIf="notification.status && notification.type !== 'mention'" class="stream__status" [statusWrapper]="notification.status"
|
||||
[notificationAccount]="notification.account" [notificationType]="notification.type"
|
||||
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)"
|
||||
(browseThreadEvent)="browseThread($event)"></app-status>
|
||||
<app-status *ngIf="notification.status && notification.type === 'update'" class="stream__status"
|
||||
[statusWrapper]="notification.status" [notificationAccount]="notification.account"
|
||||
[notificationType]="notification.type" (browseAccountEvent)="browseAccount($event)"
|
||||
(browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-status>
|
||||
|
||||
<app-status *ngIf="notification.status && notification.type === 'mention'" class="stream__status"
|
||||
[statusWrapper]="notification.status" (browseAccountEvent)="browseAccount($event)"
|
||||
(browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-status>
|
||||
|
||||
<app-status *ngIf="notification.status && notification.type !== 'mention' && notification.type !== 'update'"
|
||||
class="stream__status" [statusWrapper]="notification.status" [notificationAccount]="notification.account"
|
||||
[notificationType]="notification.type" (browseAccountEvent)="browseAccount($event)"
|
||||
(browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-status>
|
||||
|
||||
<app-status *ngIf="notification.status && notification.type === 'mention'" class="stream__status" [statusWrapper]="notification.status"
|
||||
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)"
|
||||
(browseThreadEvent)="browseThread($event)"></app-status>
|
||||
</div>
|
@ -101,7 +101,7 @@ export class NotificationsComponent extends BrowseBase {
|
||||
this.isLoading = true;
|
||||
this.isProcessingInfiniteScroll = true;
|
||||
|
||||
this.mastodonService.getNotifications(this.account.info, ['mention', 'update'], this.lastId)
|
||||
this.mastodonService.getNotifications(this.account.info, ['mention'], this.lastId)
|
||||
.then((notifications: Notification[]) => {
|
||||
if (notifications.length === 0) {
|
||||
this.maxReached = true;
|
||||
@ -152,6 +152,7 @@ export class NotificationWrapper {
|
||||
case 'reblog':
|
||||
case 'favourite':
|
||||
case 'poll':
|
||||
case 'update':
|
||||
this.status = new StatusWrapper(notification.status, provider, applyCw, hideStatus);
|
||||
break;
|
||||
}
|
||||
|
@ -34,6 +34,17 @@
|
||||
boosted your status
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="notificationType === 'update'">
|
||||
<div class="notification--icon">
|
||||
<fa-icon class="update" [icon]="faEdit"></fa-icon>
|
||||
</div>
|
||||
<div class="notification--label">
|
||||
<a href class="notification--link" title="{{ notificationAccount.acct }}"
|
||||
(click)="openAccount(notificationAccount)"
|
||||
(auxclick)="openUrl(notificationAccount.url)" innerHTML="{{ notificationAccount | accountEmoji }}"></a>
|
||||
edited the status you boosted
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="notificationType === 'poll'">
|
||||
<div class="notification--icon">
|
||||
<fa-icon class="boost" [icon]="faList"></fa-icon>
|
||||
|
@ -258,6 +258,10 @@
|
||||
color: $boost-color;
|
||||
}
|
||||
|
||||
.update {
|
||||
color: $update-color;
|
||||
}
|
||||
|
||||
.favorite {
|
||||
color: $favorite-color;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter, ViewChild, ElementRef } from "@angular/core";
|
||||
import { faStar, faRetweet, faList, faThumbtack } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faStar, faRetweet, faList, faThumbtack, faEdit } from "@fortawesome/free-solid-svg-icons";
|
||||
import { Subscription } from "rxjs";
|
||||
|
||||
import { Status, Account, Translation } from "../../../services/models/mastodon.interfaces";
|
||||
@ -23,6 +23,7 @@ export class StatusComponent implements OnInit {
|
||||
faRetweet = faRetweet;
|
||||
faList = faList;
|
||||
faThumbtack = faThumbtack;
|
||||
faEdit = faEdit;
|
||||
|
||||
displayedStatus: Status;
|
||||
displayedStatusWrapper: StatusWrapper;
|
||||
@ -52,7 +53,7 @@ export class StatusComponent implements OnInit {
|
||||
|
||||
@Input() isThreadDisplay: boolean;
|
||||
|
||||
@Input() notificationType: 'mention' | 'reblog' | 'favourite' | 'poll';
|
||||
@Input() notificationType: 'mention' | 'reblog' | 'favourite' | 'poll' | 'update';
|
||||
@Input() notificationAccount: Account;
|
||||
|
||||
private _statusWrapper: StatusWrapper;
|
||||
|
@ -126,7 +126,7 @@ export class StreamNotificationsComponent extends BrowseBase {
|
||||
this.loadMentions(userNotifications);
|
||||
});
|
||||
|
||||
this.mastodonService.getNotifications(this.account, ['update'], null, null, 10) //FIXME: disable edition update until supported
|
||||
this.mastodonService.getNotifications(this.account, [], null, null, 10)
|
||||
.then((notifications: Notification[]) => {
|
||||
this.isNotificationsLoading = false;
|
||||
|
||||
|
@ -96,7 +96,7 @@ export class StreamingWrapper {
|
||||
}
|
||||
|
||||
private pullNewNotifications() {
|
||||
this.mastodonService.getNotifications(this.account, ['update'], null, this.since_id_notifications, 10)
|
||||
this.mastodonService.getNotifications(this.account, [], null, this.since_id_notifications, 10)
|
||||
.then((notifications: Notification[]) => {
|
||||
//notifications = notifications.sort((a, b) => a.id.localeCompare(b.id));
|
||||
let soundMuted = !this.since_id_notifications;
|
||||
@ -168,9 +168,6 @@ export class StreamingWrapper {
|
||||
newUpdate.type = EventEnum.unknow;
|
||||
}
|
||||
|
||||
if(newUpdate.notification && newUpdate.notification.type === 'update') { //FIXME: disabling edition update until supported
|
||||
return;
|
||||
}
|
||||
|
||||
this.statusUpdateSubjet.next(newUpdate);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ export class UserNotificationService {
|
||||
this.notificationService.notifyHttpError(err, account);
|
||||
});
|
||||
|
||||
let getNotificationPromise = this.mastodonService.getNotifications(account, ['mention', 'update'], null, null, 10)
|
||||
let getNotificationPromise = this.mastodonService.getNotifications(account, ['mention'], null, null, 10)
|
||||
.then((notifications: Notification[]) => {
|
||||
this.processMentionsAndNotifications(account, notifications, NotificationTypeEnum.UserNotification);
|
||||
})
|
||||
|
@ -21,6 +21,7 @@ $status-primary-color: #fff;
|
||||
$status-secondary-color: #4e5572;
|
||||
$status-links-color: #d9e1e8;
|
||||
$boost-color : #5098eb;
|
||||
$update-color : #95e470;
|
||||
$favorite-color: #ffc16f;
|
||||
$bookmarked-color: #ff5050;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user