revert: note editing

This commit is contained in:
syuilo 2023-10-04 12:05:01 +09:00
parent cc4fd6b5c5
commit b40329887f
23 changed files with 19 additions and 174 deletions

View file

@ -143,7 +143,6 @@ const props = withDefaults(defineProps<{
fixed?: boolean;
autofocus?: boolean;
freezeAfterPosted?: boolean;
updateMode?: boolean;
}>(), {
initialVisibleUsers: () => [],
autofocus: true,
@ -710,7 +709,6 @@ async function post(ev?: MouseEvent) {
visibility: visibility,
visibleUserIds: visibility === 'specified' ? visibleUsers.map(u => u.id) : undefined,
reactionAcceptance,
noteId: props.updateMode ? props.initialNote?.id : undefined,
};
if (withHashtags && hashtags && hashtags.trim() !== '') {
@ -733,7 +731,7 @@ async function post(ev?: MouseEvent) {
}
posting = true;
os.api(props.updateMode ? 'notes/update' : 'notes/create', postData, token).then(() => {
os.api('notes/create', postData, token).then(() => {
if (props.freezeAfterPosted) {
posted = true;
} else {