1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 23:25:41 +02:00
This commit is contained in:
syuilo
2026-05-04 09:38:35 +09:00
parent db90e4ebc0
commit eb7691e3ba
2 changed files with 15 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ import { camelToKebab } from '@/world/utility.js';
import MkButton from '@/components/MkButton.vue';
import { prefer } from '@/preferences.js';
import { deepClone } from '@/utility/clone.js';
import { store } from '@/store.js';
// TODO: instanceのidと紛らわしいのでid -> typeにする
@@ -121,10 +122,19 @@ function updateObjectOption(k: string, v: any) {
function ok() {
if (selectedId.value == null) return;
const recentlyUsed = store.s.recentlyUsedRoomObjects;
if (!recentlyUsed.includes(selectedId.value)) {
recentlyUsed.unshift(selectedId.value);
if (recentlyUsed.length > 30) recentlyUsed.pop();
store.set('recentlyUsedRoomObjects', recentlyUsed);
}
emit('ok', {
id: selectedId.value,
options: deepClone(selectedObjectOptionsState.value),
});
dialog.value?.close();
}

View File

@@ -119,6 +119,11 @@ export const store = markRaw(new Pizzax('base', {
default: true,
},
recentlyUsedRoomObjects: {
where: 'device',
default: [] as string[],
},
//#region TODO: そのうち消す (preferに移行済み)
defaultWithReplies: {
where: 'account',