Skip to content

Commit

Permalink
[native] fix(actions.LOAD_TREE): Don't initiate sync upon reloading tree
Browse files Browse the repository at this point in the history
related to #1621

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed May 28, 2024
1 parent 1446134 commit 2289f4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/ui/NativeApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default {
async created() {
setInterval(() => {
this.$store.dispatch(actions.LOAD_ACCOUNTS)
this.$store.dispatch(actions.LOAD_TREE)
}, 5000)
const controller = await Controller.getSingleton()
controller.onLoad()
Expand Down
6 changes: 1 addition & 5 deletions src/ui/store/native/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,9 @@ export const actionsDefinition = {
async [actions.LOAD_TREE]({ commit, dispatch, state }, id) {
const account = await Account.get(id)
const tree = await account.getResource()
const treeChanged = await tree.load()
await tree.load()
const rootFolder = await tree.getBookmarksTree(true)
await commit(mutations.LOAD_TREE, rootFolder)
if (treeChanged) {
dispatch(actions.TRIGGER_SYNC, id)
dispatch(actions.LOAD_ACCOUNTS, id)
}
},
async [actions.CREATE_BOOKMARK]({commit}, {accountId, bookmark}) {
const account = await Account.get(accountId)
Expand Down

0 comments on commit 2289f4a

Please sign in to comment.