From a9d705298a1162982c6a32309c88ce02a730ba59 Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Wed, 27 Sep 2023 22:13:10 +0200 Subject: [PATCH] don't reload random covers --- src/views/Home.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 8fec13e..0215f5d 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -112,10 +112,11 @@ export default { this.$store.dispatch("boxes/loadNewest"); this.$store.dispatch("tracks/loadMostListened"); this.$store.dispatch("videos/loadMostViewed"); - - this.$store.dispatch("albums/loadRandomCovers", 48); - this.$store.dispatch("albums/loadAlbums", true); - this.$store.dispatch("artists/loadArtists", true); + if (this.randomCovers.length == 0) { + this.$store.dispatch("albums/loadRandomCovers", 48); + this.$store.dispatch("albums/loadAlbums", true); + this.$store.dispatch("artists/loadArtists", true); + } }, loadNextPage() { this.scrollPosition = this.$refs.welcome.scrollTop;