Compare commits

..

No commits in common. "b73f88fe54a02653acfdda6eaa2bbafae8231aa6" and "844d31f10c3e3aaef3d61b1ed44555ca913ae559" have entirely different histories.

2 changed files with 7 additions and 21 deletions

View File

@ -24,6 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
> >
<source <source
:src="video.url" :src="video.url"
:type="video.type"
> >
</video> </video>
<i class="ti ti-eye-off" :class="$style.hide" @click="hide = true"></i> <i class="ti ti-eye-off" :class="$style.hide" @click="hide = true"></i>

View File

@ -224,10 +224,6 @@ export class NoteManager {
public async fetch(id: string, force = false): Promise<CachedNote> { public async fetch(id: string, force = false): Promise<CachedNote> {
if (!force) { if (!force) {
const cachedNote = this.get(id); const cachedNote = this.get(id);
if (cachedNote.value === null) {
// 削除されている場合はnullを返す
return cachedNote;
}
// Renoteの場合はRenote元の更新日時も考慮する // Renoteの場合はRenote元の更新日時も考慮する
const updatedAt = isRenote(cachedNote.value) ? const updatedAt = isRenote(cachedNote.value) ?
this.updatedAt.get(id) : this.updatedAt.get(id) :
@ -268,20 +264,13 @@ export class NoteManager {
const reaction = body.reaction; const reaction = body.reaction;
if (body.emoji && !(body.emoji.name in note.value.reactionEmojis)) { if (body.emoji && !(body.emoji.name in note.value.reactionEmojis)) {
note.value.reactionEmojis = { note.value.reactionEmojis[body.emoji.name] = body.emoji.url;
...note.value.reactionEmojis, }
[body.emoji.name]: body.emoji.url,
};
}
if (reaction in note.value.reactions) { // TODO: reactionsプロパティがない場合ってあったっけ なければ || {} は消せる
note.value.reactions[reaction]++; const currentCount = (note.value.reactions || {})[reaction] || 0;
} else {
note.value.reactions = { note.value.reactions[reaction] = currentCount + 1;
...note.value.reactions,
[reaction]: 1,
};
}
if ($i && (body.userId === $i.id)) { if ($i && (body.userId === $i.id)) {
note.value.myReaction = reaction; note.value.myReaction = reaction;
@ -322,10 +311,6 @@ export class NoteManager {
case 'deleted': { case 'deleted': {
note.value = null; note.value = null;
this.connection?.send('un', { id });
this.captureing.delete(id);
this.notesComputed.delete(id);
this.updatedAt.delete(id);
break; break;
} }
} }