MOBILE-4081 notifications: Display time when clicking push

main
Dani Palou 2022-11-23 11:00:18 +01:00
parent a61fab5f70
commit 8c22079e66
3 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,7 @@
<core-format-text [text]="subject" contextLevel="system" [contextInstanceId]="0" [wsNotFiltered]="true">
</core-format-text>
</p>
<p>{{ timecreated | coreTimeAgo }}<ng-container *ngIf="userIdFrom > 0"> · {{
<p *ngIf="timecreated > 0">{{ timecreated | coreTimeAgo }}<ng-container *ngIf="userIdFrom > 0"> · {{
userFromFullName }}</ng-container>
</p>
</ion-label>

View File

@ -91,6 +91,7 @@ export class AddonNotificationsNotificationPage implements OnInit, OnDestroy {
this.userIdFrom = notification.userfromid ? Number(notification.userfromid) : -1;
this.profileImageUrlFrom = notification.senderImage;
this.userFromFullName = notification.userfromfullname;
this.timecreated = Number(notification.date ?? 0);
}
await this.loadActions(notification);

View File

@ -141,4 +141,5 @@ export type AddonNotificationsNotificationData = CorePushNotificationsNotificati
contexturl?: string; // URL related to the notification.
savedmessageid?: number; // Notification ID (optional).
id?: number; // Notification ID (optional).
date?: string; // Notification date (timestamp). E.g. "1669204700".
};