Kaynağa Gözat

Merge pull request #32402 from overleaf/jpa-auto-close-debug

[web] auto-close notification on old debug projects

GitOrigin-RevId: 6a33da9da2995e83400c73eecaf07ada2fb2505c
Maria Florencia Besteiro Gonzalez 4 ay önce
ebeveyn
işleme
ec8ef1cc5e

+ 1 - 1
services/web/app/src/Features/Notifications/NotificationsBuilder.mjs

@@ -241,7 +241,7 @@ function personalAndGroupSubscriptions(userId) {
 function oldDebugProjects(userId) {
   return {
     key: `old-debug-projects-${userId}`,
-    async create(userId) {
+    async create() {
       return await NotificationsHandler.promises.createNotification(
         userId,
         this.key,

+ 3 - 1
services/web/app/src/Features/Project/ProjectListController.mjs

@@ -642,7 +642,9 @@ async function _checkForOldDebugProjects(userId) {
     7
   )
   if (exists) {
-    await NotificationsBuilder.promises.oldDebugProjects(userId).create(userId)
+    await NotificationsBuilder.promises.oldDebugProjects(userId).create()
+  } else {
+    await NotificationsBuilder.promises.oldDebugProjects(userId).read()
   }
 }