Browse Source

fix(app): only run session.updated archive logic if archive state changes (#27637)

Brendan Allan 3 months ago
parent
commit
f179dcbf02
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/app/src/context/global-sync/event-reducer.ts

+ 1 - 0
packages/app/src/context/global-sync/event-reducer.ts

@@ -125,6 +125,7 @@ export function applyDirectoryEvent(input: {
       const info = (event.properties as { info: Session }).info
       const info = (event.properties as { info: Session }).info
       const result = Binary.search(input.store.session, info.id, (s) => s.id)
       const result = Binary.search(input.store.session, info.id, (s) => s.id)
       if (info.time.archived) {
       if (info.time.archived) {
+        if (input.store.session[result.index]!.time.archived === info.time.archived) break
         if (result.found) {
         if (result.found) {
           input.setStore(
           input.setStore(
             "session",
             "session",