(model: ModelKey)
| 113 | } |
| 114 | |
| 115 | const visible = (model: ModelKey) => { |
| 116 | const key = modelKey(model) |
| 117 | const state = visibility().get(key) |
| 118 | if (state === "hide") return false |
| 119 | if (state === "show") return true |
| 120 | if (latestSet().has(key)) return true |
| 121 | const date = release().get(key) |
| 122 | if (!date?.isValid) return true |
| 123 | return false |
| 124 | } |
| 125 | |
| 126 | const setVisibility = (model: ModelKey, state: boolean) => { |
| 127 | update(model, state ? "show" : "hide") |