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.
This commit is contained in:
parent
0fa203569a
commit
6b617f893d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user