262262 ref="searchResults"
263263 class="scroller"
264264 :searchText =" searchText "
265- :contactsLoading = " contactsLoading "
265+ :searchResultsLoading = " searchResultsLoading "
266266 :conversationsList =" conversationsList "
267267 :searchResults =" searchResults "
268268 :searchResultsListedConversations =" searchResultsListedConversations "
@@ -477,8 +477,7 @@ export default {
477477 searchText: ' ' ,
478478 searchResults: [],
479479 searchResultsListedConversations: [],
480- contactsLoading: false ,
481- listedConversationsLoading: false ,
480+ searchResultsLoading: true ,
482481 canStartConversations: getTalkConfig (' local' , ' conversations' , ' can-create' ),
483482 cancelSearchPossibleConversations : () => {},
484483 cancelSearchListedConversations : () => {},
@@ -758,8 +757,6 @@ export default {
758757 },
759758
760759 async fetchPossibleConversations () {
761- this .contactsLoading = true
762-
763760 try {
764761 // FIXME: move to conversationsStore
765762 this .cancelSearchPossibleConversations (' canceled' )
@@ -782,8 +779,6 @@ export default {
782779 this .searchResults = response? .data ? .ocs ? .data .filter ((match ) => {
783780 return ! (match .source === ATTENDEE .ACTOR_TYPE .USERS && oneToOneMap .includes (match .id ))
784781 }) ?? []
785-
786- this .contactsLoading = false
787782 } catch (exception) {
788783 if (CancelableRequest .isCancel (exception)) {
789784 return
@@ -795,16 +790,13 @@ export default {
795790
796791 async fetchListedConversations () {
797792 try {
798- this .listedConversationsLoading = true
799-
800793 // FIXME: move to conversationsStore
801794 this .cancelSearchListedConversations (' canceled' )
802795 const { request , cancel } = CancelableRequest (searchListedConversations)
803796 this .cancelSearchListedConversations = cancel
804797
805798 const response = await request (this .searchText )
806799 this .searchResultsListedConversations = response .data .ocs .data
807- this .listedConversationsLoading = false
808800 } catch (exception) {
809801 if (CancelableRequest .isCancel (exception)) {
810802 return
@@ -824,7 +816,9 @@ export default {
824816 this .showThreadsList = false
825817
826818 this .resetNavigation ()
819+ this .searchResultsLoading = true
827820 await Promise .all ([this .fetchPossibleConversations (), this .fetchListedConversations ()])
821+ this .searchResultsLoading = false
828822 this .initializeNavigation ()
829823 },
830824
0 commit comments