Commit 807ae1f8 authored by SpinShare's avatar SpinShare

add timeout to refresh to fix animation not rendering

parent 4ae906c4
...@@ -74,7 +74,10 @@ ...@@ -74,7 +74,10 @@
DeleteOverlay DeleteOverlay
}, },
mounted: function() { mounted: function() {
this.refreshLibrary(); // Put initial refresh on a timeout so the loading animation is rendered first
setTimeout(() => {
this.refreshLibrary();
}, 50);
this.$on('delete', (file) => { this.$on('delete', (file) => {
this.$data.showDeleteOverlay = true; this.$data.showDeleteOverlay = true;
...@@ -95,12 +98,13 @@ ...@@ -95,12 +98,13 @@
this.$on('install', () => { this.$on('install', () => {
this.install(); this.install();
}); });
// Refresh if the Download Queue finished an item
ipcRenderer.on("download-complete", (event, downloadItem) => { ipcRenderer.on("download-complete", (event, downloadItem) => {
this.refreshLibrary(); this.refreshLibrary();
}); });
}, },
methods: { methods: {
// TODO: Make this truly async
refreshLibrary: async function() { refreshLibrary: async function() {
let ssapi = new SSAPI(process.env.NODE_ENV === 'development'); let ssapi = new SSAPI(process.env.NODE_ENV === 'development');
let userSettings = new UserSettings(); let userSettings = new UserSettings();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment