diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-08-25 04:27:47 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-08-25 09:52:13 +0200 |
commit | 0b733ca7909bb96269613ca05df7a91eb083d042 (patch) | |
tree | 3ecf3fb849c81f1bec7c19d3e1a9701d390c4a79 /app/javascript/flavours/glitch/util/filters.js | |
parent | 28f0dfc0b42cde1e9443df13cae471ee7bb9d988 (diff) |
[Glitch] Add ability to filter individual posts
Port 50487db1224851a49ee523bbc013d5f8686a7a55 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/util/filters.js')
-rw-r--r-- | app/javascript/flavours/glitch/util/filters.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/util/filters.js b/app/javascript/flavours/glitch/util/filters.js new file mode 100644 index 000000000..97b433a99 --- /dev/null +++ b/app/javascript/flavours/glitch/util/filters.js @@ -0,0 +1,16 @@ +export const toServerSideType = columnType => { + switch (columnType) { + case 'home': + case 'notifications': + case 'public': + case 'thread': + case 'account': + return columnType; + default: + if (columnType.indexOf('list:') > -1) { + return 'home'; + } else { + return 'public'; // community, account, hashtag + } + } +}; |