diff --git a/client/posts/hide.ts b/client/posts/hide.ts index d822f4f42..057512fbc 100644 --- a/client/posts/hide.ts +++ b/client/posts/hide.ts @@ -1,6 +1,6 @@ // Hide posts you don't like -import { storeHidden, hidden, posts } from "../state" +import { storeHidden, hidden, posts, mine } from "../state" import { Post } from "./model" import { clearStore } from "../db" import { trigger } from "../util" @@ -25,7 +25,7 @@ export function clearHidden() { // Hide all posts that reply to post recursively export function hideRecursively(post: Post) { - if (post.hidden) { + if (post.hidden || mine.has(post.id)) { return } post.hide() diff --git a/client/posts/menu.ts b/client/posts/menu.ts index 13e5445a2..0d7c47b7f 100644 --- a/client/posts/menu.ts +++ b/client/posts/menu.ts @@ -1,6 +1,6 @@ import { View } from "../base" import { Post } from "./model" -import { getModel } from "../state" +import { getModel, mine } from "../state" import { on, postJSON, HTML } from "../util" import { FormView } from "../ui" import lang from "../lang" @@ -121,7 +121,7 @@ const actions: { [key: string]: ItemSpec } = { hide: { text: lang.posts["hide"], shouldRender(m) { - return true + return !mine.has(m.id); }, handler: hidePost, },