about summary refs log tree commit diff
path: root/src/state/models/muted-threads.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-11-08 09:08:42 -0800
committerGitHub <noreply@github.com>2023-11-08 09:08:42 -0800
commit74f8390f1d879350ebb6516fade2b1d83d1601e7 (patch)
treebf627b889faf1c4078562d5644d17422fee2df55 /src/state/models/muted-threads.ts
parent4afed4be281b6319c328938e4ed757624a78b13c (diff)
downloadvoidsky-74f8390f1d879350ebb6516fade2b1d83d1601e7.tar.zst
Move muted threads to new persistence + context (#1838)
Diffstat (limited to 'src/state/models/muted-threads.ts')
-rw-r--r--src/state/models/muted-threads.ts29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/state/models/muted-threads.ts b/src/state/models/muted-threads.ts
deleted file mode 100644
index e6f202745..000000000
--- a/src/state/models/muted-threads.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * This is a temporary client-side system for storing muted threads
- * When the system lands on prod we should switch to that
- */
-
-import {makeAutoObservable} from 'mobx'
-import {isObj, hasProp, isStrArray} from 'lib/type-guards'
-
-export class MutedThreads {
-  uris: Set<string> = new Set()
-
-  constructor() {
-    makeAutoObservable(
-      this,
-      {serialize: false, hydrate: false},
-      {autoBind: true},
-    )
-  }
-
-  serialize() {
-    return {uris: Array.from(this.uris)}
-  }
-
-  hydrate(v: unknown) {
-    if (isObj(v) && hasProp(v, 'uris') && isStrArray(v.uris)) {
-      this.uris = new Set(v.uris)
-    }
-  }
-}