From 6b617f893d73fb9e8304d228336cf574c29992a3 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 12 Nov 2022 16:48:01 +0100 Subject: [PATCH] SearchResults: remove computed search prop It is only used in one location, and not from the template. In other words we should inline it to make the code simpler. --- client/components/Windows/SearchResults.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/Windows/SearchResults.vue b/client/components/Windows/SearchResults.vue index a9dbdb8f..b6265e2b 100644 --- a/client/components/Windows/SearchResults.vue +++ b/client/components/Windows/SearchResults.vue @@ -129,13 +129,14 @@ export default defineComponent({ const oldScrollTop = ref(0); const oldChatHeight = ref(0); - const search = computed(() => store.state.messageSearchResults); const messages = computed(() => { - if (!search.value) { + const results = store.state.messageSearchResults?.results; + + if (!results) { return []; } - return search.value.results; + return results; }); const chan = computed(() => { @@ -307,7 +308,6 @@ export default defineComponent({ loadMoreButton, messages, moreResultsAvailable, - search, network, channel, route,