OverviewFilesCommitsIssuesDocsReleasesPeers

keet-deobfuscated / @holepunchto / keet-store / store / chat / cleanup / cleanup.saga.js

24 lines · javascript ref:
import { call as e, put as i, select as l, takeEvery as o } from "redux-saga/effects"
import {
  clearEditingMessage as r,
  getEditingMessageId as t,
  setEditingMessage as d,
} from "../list-view"
import {
  clearReplyingMessage as y,
  getReplyingMessageId as f,
  setReplyingMessage as m,
} from "../reply-message"
import { getChatSearchLive as n, toggleChatSearching as a } from "../search"
function* c() {
  ;(yield l(n)) && (yield i(a()))
}
export function* chatCleanupSaga() {
  ;(yield o(m, function* () {
    ;(yield e(c), (yield l(t)) && (yield i(r())))
  }),
    yield o(d, function* () {
      ;(yield e(c), (yield l(f)) && (yield i(y())))
    }))
}