From 22c2df11f818850a1283ab5a90e42b65a18c2af6 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sun, 22 Mar 2026 04:53:50 +0000 Subject: [PATCH] Fix the ability to mark communications signal/noise --- ts/store/communication.ts | 3 ++- ts/view/Communication.vue | 14 ++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ts/store/communication.ts b/ts/store/communication.ts index 15c42ef6..3371c403 100644 --- a/ts/store/communication.ts +++ b/ts/store/communication.ts @@ -1,10 +1,11 @@ import { defineStore } from "pinia"; import { ref, computed } from "vue"; import { useUserStore } from "./user"; +import { Communication } from "../types"; export const useCommunicationStore = defineStore("communication", () => { // State - const all = ref(null); + const all = ref(null); const loading = ref(false); const error = ref(null); diff --git a/ts/view/Communication.vue b/ts/view/Communication.vue index ccdb6613..a85064ce 100644 --- a/ts/view/Communication.vue +++ b/ts/view/Communication.vue @@ -887,17 +887,15 @@ async function markInvalid() { } function removeCurrentFromList() { - const index = communications.value.findIndex( - (c) => c.id === selectedCommunication.value.id, - ); + const index = communication.all.findIndex((c) => c.id === selectedId.value); if (index > -1) { - communications.value.splice(index, 1); + communication.all.splice(index, 1); } - if (communications.value.length > 0) { - const nextIndex = Math.min(index, communications.value.length - 1); - selectedCommunication.value = communications.value[nextIndex]; + if (communication.all.length > 0) { + const nextIndex = Math.min(index, communication.all.length - 1); + selectedId.value = communication.all[nextIndex].id; } else { - selectedCommunication.value = null; + selectedId.value = null; } }