remove unused parameter from get-note-versions-menu.ts
This commit is contained in:
@@ -820,7 +820,7 @@ function showMenu(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function menuVersions(): Promise<void> {
|
async function menuVersions(): Promise<void> {
|
||||||
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value, menuButton: menuVersionsButton });
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value });
|
||||||
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -760,7 +760,7 @@ function showMenu(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function menuVersions(): Promise<void> {
|
async function menuVersions(): Promise<void> {
|
||||||
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value, menuButton: menuVersionsButton });
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value });
|
||||||
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ const props = defineProps<{
|
|||||||
const menuVersionsButton = shallowRef<HTMLElement>();
|
const menuVersionsButton = shallowRef<HTMLElement>();
|
||||||
|
|
||||||
async function menuVersions(): Promise<void> {
|
async function menuVersions(): Promise<void> {
|
||||||
const { menu, cleanup } = await getNoteVersionsMenu({ note: props.note, menuButton: menuVersionsButton });
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: props.note });
|
||||||
popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -820,7 +820,7 @@ function showMenu(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function menuVersions(): Promise<void> {
|
async function menuVersions(): Promise<void> {
|
||||||
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value, menuButton: menuVersionsButton });
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value });
|
||||||
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ function showMenu(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function menuVersions(): Promise<void> {
|
async function menuVersions(): Promise<void> {
|
||||||
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value, menuVersionsButton });
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value });
|
||||||
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
os.popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const MOBILE_THRESHOLD = 500;
|
|||||||
const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD);
|
const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD);
|
||||||
|
|
||||||
async function menuVersions(): Promise<void> {
|
async function menuVersions(): Promise<void> {
|
||||||
const { menu, cleanup } = await getNoteVersionsMenu({ note: props.note, menuButton: menuVersionsButton });
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: props.note });
|
||||||
popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { defineAsyncComponent } from 'vue';
|
|||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { misskeyApi } from './misskey-api.js';
|
import { misskeyApi } from './misskey-api.js';
|
||||||
import { dateTimeFormat } from './intl-const.js';
|
import { dateTimeFormat } from './intl-const.js';
|
||||||
import type { Ref } from 'vue';
|
|
||||||
import type { MenuItem } from '@/types/menu.js';
|
import type { MenuItem } from '@/types/menu.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
@@ -17,10 +16,7 @@ interface NoteEdit {
|
|||||||
text: string | null;
|
text: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getNoteVersionsMenu(props: {
|
export async function getNoteVersionsMenu(props: { note: Misskey.entities.Note }) {
|
||||||
note: Misskey.entities.Note;
|
|
||||||
menuButton: Ref<HTMLElement>;
|
|
||||||
}) {
|
|
||||||
const isRenote = (
|
const isRenote = (
|
||||||
props.note.renote != null &&
|
props.note.renote != null &&
|
||||||
props.note.text == null &&
|
props.note.text == null &&
|
||||||
|
|||||||
Reference in New Issue
Block a user