minor fixes for deletion compatibility
This commit is contained in:
@@ -174,6 +174,12 @@ const store = createStore<State>({
|
||||
const msgs = msgOnRoomId(state, payload.roomId);
|
||||
const msgIndex = msgs?.messages.findIndex((msg) => msg.id == payload.messageId) ?? -1;
|
||||
if (msgs && msgIndex != -1) {
|
||||
if (!isSeenFc(msgs.messages[msgIndex].flags)) {
|
||||
const room = roomOnId(state, payload.roomId);
|
||||
if (room) {
|
||||
room.notSeen = room.notSeen - 1;
|
||||
}
|
||||
}
|
||||
msgs.messages.splice(msgIndex, 1);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -51,6 +51,7 @@ function openMessageView(messageId) {
|
||||
|
||||
const shouldBeCompact = (index) => {
|
||||
// show last three messages
|
||||
// todo fix not changing three displayed when deleting
|
||||
if (messages.value?.length - 4 < index) return false;
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user