Skip to content

Commit

Permalink
Merge pull request #19 from melvinkcx/fix_sync_status_not_updated
Browse files Browse the repository at this point in the history
Fixed #16 and JSON read
  • Loading branch information
melvinkcx authored Nov 17, 2019
2 parents ddd6e49 + ed9b8fd commit ed289bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/configs/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __getattr__(self, item):
def _read_config(self):
try:
with open(self.CONFIG_FILE, "r") as f:
self.config = json.load(f.read())
self.config = json.load(f)
except FileNotFoundError:
self.config = self._create_config()

Expand Down
3 changes: 3 additions & 0 deletions view/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ export default new Vuex.Store({
const currentDirFiles = await window.pywebview.api.scan({path});
store.commit('setCurrentDir', path);
store.commit('setCurrentDirFiles', currentDirFiles);
if (currentDirFiles.filter((f) => f.length > 2 && ["NOT_UPLOADED", "NOT_SYNCED"].includes(f[2])).length > 0) {
store.commit('setStatus', 'NOT_SYNCED');
}
return currentDirFiles;
},
async sync(store) {
Expand Down

0 comments on commit ed289bb

Please sign in to comment.