fix: default-selected reply scopes on client #67

Closed
toast wants to merge 8 commits from feat/default-note-visibility into main
Showing only changes of commit bc42871d68 - Show all commits

View file

@ -147,10 +147,14 @@ let imeText = $ref('');
// TODO: compat with misskey-js, should likely be moved into foundkey-js
const visibilityScore = (a: string): number => {
switch (a) {
case 'home': return 2;
case 'followers': return 1;
case 'specified': return 0;
default: return 3; // includes public
case 'specified':
return 0;
case 'followers':
return 1;
case 'home':
return 2;
case 'public': default:
return 3;
}
};
const minVisibility = (a: string, b: string): string => visibilityScore(b) > visibilityScore(a) ? a : b;