OverviewFilesCommitsIssuesDocsReleasesPeers

keet-deobfuscated / @holepunchto / keet-store / store / app / saga / app-desktop-unread-rooms-watcher.saga.js

16 lines · javascript ref:
import { call as o, getContext as e, select as t, takeLatest as r } from "redux-saga/effects"
import { getRoomListUnreadRoomsCount as i, setUnreadRoomsCount as a } from "../../room"
import { PLATFORM_CONTEXT_KEY as n } from "../../constants"
export function* appDesktopUnreadRoomsWatcherSaga() {
  const { badge: d } = yield e(n)
  let m = yield t(i)
  yield r(a, function* () {
    const e = yield t(i)
    m !== e &&
      (((o) => {
        m = o
      })(e),
      yield o(d, e))
  })
}