Hide posts that would be empty.

Hide posts that contain only text or only media if that content type
is no displayed anyway.
This commit is contained in:
Marcel Hellkamp 2023-07-28 19:21:32 +02:00
parent d7fde80d06
commit 1be255ec4c

View File

@ -198,6 +198,10 @@ const filterStatus = (cfg: Config, status: MastodonStatus) => {
if (status.account?.suspended) return false; if (status.account?.suspended) return false;
if (status.account?.limited) return false; if (status.account?.limited) return false;
// Filter posts that would show up empty
if(!cfg.showText && ! status.media_attachments?.length) return false;
if(!cfg.showMedia && ! status.content.trim()) return false;
// Accept anything else // Accept anything else
return true; return true;
} }