From ef98421d80809295ecb6c10ed9054857024574bb Mon Sep 17 00:00:00 2001
From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Fri, 17 Jan 2025 13:35:38 +0900
Subject: [PATCH] refactor
---
packages/frontend/src/components/MkPostForm.vue | 3 +--
packages/frontend/src/scripts/check-permissions.ts | 8 --------
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index 3dea84df18a0..c2cbfca714ac 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -86,7 +86,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -131,7 +131,6 @@ import { miLocalStorage } from '@/local-storage.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { emojiPicker } from '@/scripts/emoji-picker.js';
import { mfmFunctionPicker } from '@/scripts/mfm-function-picker.js';
-import { serverNoteDraftAvailable } from '@/scripts/check-permissions.js';
const $i = signinRequired();
diff --git a/packages/frontend/src/scripts/check-permissions.ts b/packages/frontend/src/scripts/check-permissions.ts
index dbab7f4eb20b..ed86529d5b89 100644
--- a/packages/frontend/src/scripts/check-permissions.ts
+++ b/packages/frontend/src/scripts/check-permissions.ts
@@ -17,11 +17,3 @@ export const notesSearchAvailable = (
export const canSearchNonLocalNotes = (
instance.noteSearchableScope === 'global'
);
-
-export const serverNoteDraftAvailable = (
- // FIXME: instance.policies would be null in Vitest
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
- ($i == null && instance.policies != null && instance.policies.noteDraftLimit > 0) ||
- ($i != null && $i.policies.noteDraftLimit > 0) ||
- false
-);