Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Commit

Permalink
MainActivity: Only load song from disk on startup
Browse files Browse the repository at this point in the history
Signed-off-by: Shinjo Akane <[email protected]>
  • Loading branch information
AkaneTan committed Jul 19, 2023
1 parent e504efd commit 9136f42
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/src/main/java/org/akanework/symphonica/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,11 @@ class MainActivity : AppCompatActivity() {

// Initialize loading sequence.
coroutineScope.launch {
loadDataFromDisk()
if (libraryViewModel.librarySongList.isEmpty()) {
loadDataFromDisk()
}

if (!isForceLoadingEnabled) {
// Look, listen.
// I know what you're thinking.
// Let me explain. Go to sortAlbumListByTrackNumber's define page.
withContext(Dispatchers.IO) {
libraryViewModel.librarySortedAlbumList = sortAlbumListByTrackNumber(
libraryViewModel.libraryAlbumList
Expand Down

0 comments on commit 9136f42

Please sign in to comment.