fix: default-selected reply scopes on client #67
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue