mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-05 15:53:08 +02:00
upd: add additional check to visibility selector for boost
This commit is contained in:
parent
fb75282ea8
commit
d586d1e6f8
6 changed files with 10 additions and 10 deletions
|
@ -449,9 +449,9 @@ function renote(visibility: Visibility | 'local') {
|
|||
const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
|
||||
const localOnlySetting = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
|
||||
|
||||
let noteVisibility = visibility === 'local' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
let noteVisibility = visibility === 'local' || visibility === 'specified' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
if (appearNote.channel?.isSensitive) {
|
||||
noteVisibility = smallerVisibility(visibility === 'local' ? appearNote.visibility : visibility, 'home');
|
||||
noteVisibility = smallerVisibility(visibility === 'local' || visibility === 'specified' ? appearNote.visibility : visibility, 'home');
|
||||
}
|
||||
|
||||
if (!props.mock) {
|
||||
|
|
|
@ -495,9 +495,9 @@ function renote(visibility: Visibility | 'local') {
|
|||
const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
|
||||
const localOnlySetting = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
|
||||
|
||||
let noteVisibility = visibility === 'local' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
let noteVisibility = visibility === 'local' || visibility === 'specified' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
if (appearNote.channel?.isSensitive) {
|
||||
noteVisibility = smallerVisibility(visibility === 'local' ? appearNote.visibility : visibility, 'home');
|
||||
noteVisibility = smallerVisibility(visibility === 'local' || visibility === 'specified' ? appearNote.visibility : visibility, 'home');
|
||||
}
|
||||
|
||||
os.api('notes/create', {
|
||||
|
|
|
@ -320,7 +320,7 @@ function renote(visibility: 'public' | 'home' | 'followers' | 'specified' | 'loc
|
|||
os.api('notes/create', {
|
||||
renoteId: props.note.id,
|
||||
localOnly: visibility === 'local' ? true : false,
|
||||
visibility: visibility === 'local' ? props.note.visibility : visibility,
|
||||
visibility: visibility === 'local' || visibility === 'specified' ? props.note.visibility : visibility,
|
||||
}).then(() => {
|
||||
os.toast(i18n.ts.renoted);
|
||||
renoted.value = true;
|
||||
|
|
|
@ -450,9 +450,9 @@ function renote(visibility: Visibility | 'local') {
|
|||
const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
|
||||
const localOnlySetting = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
|
||||
|
||||
let noteVisibility = visibility === 'local' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
let noteVisibility = visibility === 'local' || visibility === 'specified' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
if (appearNote.channel?.isSensitive) {
|
||||
noteVisibility = smallerVisibility(visibility === 'local' ? appearNote.visibility : visibility, 'home');
|
||||
noteVisibility = smallerVisibility(visibility === 'local' || visibility === 'specified' ? appearNote.visibility : visibility, 'home');
|
||||
}
|
||||
|
||||
if (!props.mock) {
|
||||
|
|
|
@ -503,9 +503,9 @@ function renote(visibility: Visibility | 'local') {
|
|||
const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
|
||||
const localOnlySetting = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
|
||||
|
||||
let noteVisibility = visibility === 'local' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
let noteVisibility = visibility === 'local' || visibility === 'specified' ? smallerVisibility(appearNote.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
||||
if (appearNote.channel?.isSensitive) {
|
||||
noteVisibility = smallerVisibility(visibility === 'local' ? appearNote.visibility : visibility, 'home');
|
||||
noteVisibility = smallerVisibility(visibility === 'local' || visibility === 'specified' ? appearNote.visibility : visibility, 'home');
|
||||
}
|
||||
|
||||
os.api('notes/create', {
|
||||
|
|
|
@ -329,7 +329,7 @@ function renote(visibility: 'public' | 'home' | 'followers' | 'specified' | 'loc
|
|||
os.api('notes/create', {
|
||||
renoteId: props.note.id,
|
||||
localOnly: visibility === 'local' ? true : false,
|
||||
visibility: visibility === 'local' ? props.note.visibility : visibility,
|
||||
visibility: visibility === 'local' || visibility === 'specified' ? props.note.visibility : visibility,
|
||||
}).then(() => {
|
||||
os.toast(i18n.ts.renoted);
|
||||
renoted.value = true;
|
||||
|
|
Loading…
Reference in a new issue