refactor
This commit is contained in:
parent
bdec4bf87a
commit
08ecf7ca79
|
@ -194,7 +194,7 @@ const sensitiveMediaDetectionForm = useForm({
|
|||
state.sensitiveMediaDetectionSensitivity === 2 ? 'medium' :
|
||||
state.sensitiveMediaDetectionSensitivity === 3 ? 'high' :
|
||||
state.sensitiveMediaDetectionSensitivity === 4 ? 'veryHigh' :
|
||||
0,
|
||||
null as never,
|
||||
setSensitiveFlagAutomatically: state.setSensitiveFlagAutomatically,
|
||||
enableSensitiveMediaDetectionForVideos: state.enableSensitiveMediaDetectionForVideos,
|
||||
});
|
||||
|
|
|
@ -138,9 +138,10 @@ async function addPinnedNote() {
|
|||
const { canceled, result: value } = await os.inputText({
|
||||
title: i18n.ts.noteIdOrUrl,
|
||||
});
|
||||
if (canceled) return;
|
||||
if (canceled || value == null) return;
|
||||
const fromUrl = value.includes('/') ? value.split('/').pop() : null;
|
||||
const note = await os.apiWithDialog('notes/show', {
|
||||
noteId: value.includes('/') ? value.split('/').pop() : value,
|
||||
noteId: fromUrl ?? value,
|
||||
});
|
||||
pinnedNotes.value = [{
|
||||
id: note.id,
|
||||
|
|
Loading…
Reference in New Issue