This commit is contained in:
parent
4e29da828f
commit
7e7aece2f5
|
@ -238,7 +238,16 @@ const translation = ref<any>(null);
|
|||
const translating = ref(false);
|
||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && !!appearNote?.user.instance);
|
||||
const canRenote = computed(() => (!!appearNote && !!$i) && (['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id));
|
||||
let renoteCollapsed = $ref(note && appearNote && defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId || $i.id === appearNote.userId)) || (appearNote.myReaction != null)));
|
||||
let renoteCollapsed = $ref(
|
||||
note &&
|
||||
appearNote &&
|
||||
defaultStore.state.collapseRenotes &&
|
||||
isRenote.value &&
|
||||
(
|
||||
($i && ($i.id === note.userId || $i.id === appearNote.userId)) ||
|
||||
(appearNote.myReaction != null)
|
||||
)
|
||||
);
|
||||
|
||||
const keymap = {
|
||||
'r': () => reply(true),
|
||||
|
@ -518,12 +527,14 @@ onActivated(() => {
|
|||
});
|
||||
|
||||
onDeactivated(() => {
|
||||
// 不要なキャッシュ消去や通信を防止するため遅延させる
|
||||
setTimeout(() => {
|
||||
if (unuse.value) {
|
||||
unuse.value();
|
||||
unuse.value = undefined;
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
|
@ -131,7 +131,8 @@ export class NoteManager {
|
|||
public async fetch(id: string, force = false): Promise<CachedNote> {
|
||||
if (!force) {
|
||||
const updatedAt = this.updatedAt.get(id);
|
||||
if (updatedAt && Date.now() - updatedAt < 1000 * 30) {
|
||||
// 2分以上経過していない場合はキャッシュを返す
|
||||
if (updatedAt && Date.now() - updatedAt < 1000 * 120) {
|
||||
const cachedNote = this.get(id);
|
||||
if (cachedNote) {
|
||||
return cachedNote;
|
||||
|
|
Loading…
Reference in New Issue