fix(slint): spinner on home/album/artist + dedupe only in All-tab carousel
Home, Album and Artist views now show the rotating LoadingSpinner (same as search) above a label while the initial load runs, replacing the bare Loading… text. The top-result-artist dedupe moved from map_search_all into apply_search and replace_category: the full artists list is kept in SearchState.artists (used by the Artists tab grid), and a separate artists-carousel drops the duplicate next to the Most-popular hero on the All tab. cc
This commit is contained in:
6 files changed
+92
-33
No files matched your search
@@ -13,6 +13,7 @@ import { Carousel } from "Carousel.slint";
|
||||
import { GridSection } from "GridSection.slint";
|
||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||
import { NavButtons } from "../shell/NavButtons.slint";
|
||||
import { LoadingSpinner } from "../primitives/LoadingSpinner.slint";
|
||||
|
||||
// Header + hint shown for a recently-played module while it has no data
|
||||
// yet (the play history fills once the playback session records plays).
|
||||
@@ -217,10 +218,22 @@ export component HomeView inherits Rectangle {
|
||||
spacing: 40px;
|
||||
alignment: start;
|
||||
|
||||
if HomeState.loading && HomeState.sections.length == 0: Text {
|
||||
text: @tr("Loading your music...");
|
||||
color: Theme.text-muted;
|
||||
font-size: 14px;
|
||||
if HomeState.loading && HomeState.sections.length == 0: Rectangle {
|
||||
height: 320px;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
spacing: 18px;
|
||||
HorizontalLayout {
|
||||
alignment: center;
|
||||
LoadingSpinner { size: 36px; }
|
||||
}
|
||||
Text {
|
||||
text: @tr("Loading your music…");
|
||||
color: Theme.text-muted;
|
||||
font-size: 13px;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for section in HomeState.sections: Carousel {
|
||||
|
||||
Reference in new issue
Block a user