enhance(frontend): お気に入りチャンネルをキャッシュするように (#13881)
This commit is contained in:
@@ -83,6 +83,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { deviceKind } from '@/scripts/device-kind.js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import { url } from '@/config.js';
|
||||
import { favoritedChannelsCache } from '@/cache.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import { defaultStore } from '@/store.js';
|
||||
@@ -153,6 +154,7 @@ function favorite() {
|
||||
channelId: channel.value.id,
|
||||
}).then(() => {
|
||||
favorited.value = true;
|
||||
favoritedChannelsCache.delete();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -168,6 +170,7 @@ async function unfavorite() {
|
||||
channelId: channel.value.id,
|
||||
}).then(() => {
|
||||
favorited.value = false;
|
||||
favoritedChannelsCache.delete();
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user