diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-07-12 11:33:11 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-07-12 15:31:42 +0200 |
commit | d8b13b46f7a6fd934b7b76fd221f728108a410e2 (patch) | |
tree | 42ee9ae07ba7b47e13e6f02a96dbbdef5507268f /app/javascript/flavours/glitch/util | |
parent | cd05378b594184d3b736b6ef6ef1c6e3d159db21 (diff) |
Move privacyPreference to utils
Diffstat (limited to 'app/javascript/flavours/glitch/util')
-rw-r--r-- | app/javascript/flavours/glitch/util/privacy_preference.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/util/privacy_preference.js b/app/javascript/flavours/glitch/util/privacy_preference.js new file mode 100644 index 000000000..7781ca7fa --- /dev/null +++ b/app/javascript/flavours/glitch/util/privacy_preference.js @@ -0,0 +1,5 @@ +export const order = ['public', 'unlisted', 'private', 'direct']; + +export function privacyPreference (a, b) { + return order[Math.max(order.indexOf(a), order.indexOf(b), 0)]; +}; |