You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(session): Fix initial scan hang on empty media device and improve empty state UX
Resolves a critical bug where the application would hang indefinitely on the "Scanning device..." screen during a fresh installation on devices with no media files. Bumps app version to 0.9.2.
The root cause was a race condition in the data loading pipeline. The previous implementation could not distinguish between a temporary empty state from the Room cache and a definitive "no folders found" result after a full scan. This commit refactors the folder loading mechanism in `DirectMediaRepositoryImpl` to use the `transformLatest` operator, which guarantees a single, definitive emission for the initial load.
Additionally, this commit introduces a new, user-friendly empty state message on the `SessionSetupScreen`.
- A dedicated message with an icon now appears when no media folders are found, replacing the previous blank screen for better UX.
- The implementation ensures that pull-to-refresh functionality remains fully intact on this new empty state screen.
- A flicker guard was also added to the `SessionSetupViewModel` to prevent the folder list from disappearing during a manual refresh.
This commit also improves some text for clarity in the "Mark as Sorted" confirmation dialog and in the Swiper "All media has been organized" page.
VERSION: 0.9.1 -> 0.9.2
val isRecursive = singleFolder.bucketId in uiState.recursivelySelectedRoots
129
130
titleText ="Mark as Sorted?"
130
131
bodyText =if (isRecursive) {
131
-
"Are you sure you want to permanently hide '${singleFolder.bucketName}' and its subfolders from this list? You can reset this in the settings."
132
+
"Are you sure you want to permanently hide '${singleFolder.bucketName}' and its subfolders from this list? These folders won't show up here even if you add new media to them. You can reset this in the settings."
132
133
} else {
133
-
"Are you sure you want to permanently hide '${singleFolder.bucketName}' from this list? You can reset this in the settings."
134
+
"Are you sure you want to permanently hide '${singleFolder.bucketName}' from this list? This folder won't show up here even if you add new media to it. You can reset this in the settings."
134
135
}
135
136
} else {
136
137
titleText ="Mark ${foldersToMark.size} Folders as Sorted?"
0 commit comments