diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-04-26 12:12:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 12:12:08 +0300 |
commit | 336cafd2190143d6c339319133249474255645ca (patch) | |
tree | 02935e175b64b494ed06da7fb64c0f82baa2c5e2 /src/store | |
parent | cd0af943c39d3cde83191e8a568598808cf88c87 (diff) | |
parent | a7d53da05bca7a64c75ae5d365b5a98d8f2288fe (diff) |
Merge pull request #7154 from nextcloud/feature/7145/implement-shared-items-browser
Shared Items browser
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/sharedItemsStore.js (renamed from src/store/conversationSharedItemsStore.js) | 8 | ||||
-rw-r--r-- | src/store/storeConfig.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/store/conversationSharedItemsStore.js b/src/store/sharedItemsStore.js index 9242dd0c8..b5ce88754 100644 --- a/src/store/conversationSharedItemsStore.js +++ b/src/store/sharedItemsStore.js @@ -21,7 +21,7 @@ */ import Vue from 'vue' -import { getSharedItemsOverview, getSharedItems } from '../services/conversationSharedItemsService' +import { getSharedItemsOverview, getSharedItems } from '../services/sharedItemsService' import { SHARED_ITEM } from '../constants' const getItemTypeFromMessage = function(message) { @@ -120,19 +120,19 @@ const actions = { return false } - const limit = 100 + const limit = 20 const lastKnownMessageId = Math.min.apply(Math, Object.keys(state.sharedItemsByConversationAndType[token][type])) try { const response = await getSharedItems(token, type, lastKnownMessageId, limit) const messages = response.data.ocs.data const hasMore = messages.length >= limit - // loop over the response elements and add them to the store for (const message in messages) { + commit('addSharedItemMessage', { token, type, - message, + message: messages[message], }) } return hasMore diff --git a/src/store/storeConfig.js b/src/store/storeConfig.js index 9f5fbe9c1..121f3cdcf 100644 --- a/src/store/storeConfig.js +++ b/src/store/storeConfig.js @@ -39,7 +39,7 @@ import uiModeStore from './uiModeStore' import windowVisibilityStore from './windowVisibilityStore' import messageActionsStore from './messageActionsStore' import reactionsStore from './reactionsStore' -import conversationSharedItemStore from './conversationSharedItemsStore' +import sharedItemStore from './sharedItemsStore' export default { modules: { @@ -62,7 +62,7 @@ export default { windowVisibilityStore, messageActionsStore, reactionsStore, - conversationSharedItemStore, + sharedItemStore, }, mutations: {}, |