File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
kit/src/views/Notifications/pages Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,7 @@ function BaseNotificationList() {
492492 item ?. body ?. extras ?. params ?. msgId ||
493493 item ?. body ?. extras ?. msgId ||
494494 '' ,
495+ isRead : ! ! item . readed ,
495496 } ) ;
496497 setTimeout ( ( ) => {
497498 if ( ! item . readed ) {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export class PageScene extends BaseScene {
3737 public notificationItemClicked (
3838 notificationId : string ,
3939 type : ENotificationPushTopicTypes | 'unknown' ,
40- clickFrom : 'notificationClick ' | 'notificationListClick ' ,
40+ clickFrom : 'app ' | 'system ' ,
4141 ) {
4242 return { notificationId, type, clickFrom } ;
4343 }
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ export interface INavigateToNotificationDetailParams {
121121 mode ?: ENotificationPushMessageMode ;
122122 payload ?: string ;
123123 topicType ?: ENotificationPushTopicTypes ;
124+ isRead ?: boolean ;
124125}
125126
126127export function parseNotificationPayload (
@@ -174,18 +175,21 @@ async function navigateToNotificationDetail({
174175 mode,
175176 payload,
176177 topicType,
178+ isRead = false ,
177179} : INavigateToNotificationDetailParams ) {
178180 let routes : string [ ] = [ ] ;
179181 let params : any = { } ;
180182 let shouldAckRead = true ;
181183
182- setTimeout ( ( ) => {
183- defaultLogger . app . page . notificationItemClicked (
184- notificationId ,
185- topicType || 'unknown' ,
186- isFromNotificationClick ? 'notificationClick' : 'notificationListClick' ,
187- ) ;
188- } ) ;
184+ if ( ! isRead ) {
185+ setTimeout ( ( ) => {
186+ defaultLogger . app . page . notificationItemClicked (
187+ notificationId ,
188+ topicType || 'unknown' ,
189+ isFromNotificationClick ? 'app' : 'system' ,
190+ ) ;
191+ } ) ;
192+ }
189193
190194 if ( isFromNotificationClick ) {
191195 const statusRoutes = appGlobals . $navigationRef . current ?. getState ( ) . routes ;
You can’t perform that action at this time.
0 commit comments