mirror of
https://github.com/thelounge/thelounge
synced 2024-11-25 13:30:21 +00:00
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
1 changed files with 4 additions and 4 deletions
|
@ -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 a new issue