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