From 69a4bcb238b347a139bfb1192413b45c8b9d7e36 Mon Sep 17 00:00:00 2001 From: Eugenij Date: Mon, 15 Jul 2019 16:42:27 +0000 Subject: New search --- src/modules/statuses.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules/statuses.js') diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 9d8d768c..7d5d5a67 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -602,6 +602,14 @@ const statuses = { fetchRepeats ({ rootState, commit }, id) { rootState.api.backendInteractor.fetchRebloggedByUsers(id) .then(rebloggedByUsers => commit('addRepeats', { id, rebloggedByUsers, currentUser: rootState.users.currentUser })) + }, + search (store, { q, resolve, limit, offset, following }) { + return store.rootState.api.backendInteractor.search2({ q, resolve, limit, offset, following }) + .then((data) => { + store.commit('addNewUsers', data.accounts) + store.commit('addNewStatuses', { statuses: data.statuses }) + return data + }) } }, mutations -- cgit v1.2.3-70-g09d2