Skip to content

Commit

Permalink
Load the installed apps in IO thread on resume (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuester authored Nov 2, 2021
1 parent 6ee428b commit 561ab43
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.sduduzog.slimlauncher.utils.BaseFragment
import com.sduduzog.slimlauncher.utils.OnLaunchAppListener
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.android.synthetic.main.home_fragment.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import java.text.DateFormat
import java.text.SimpleDateFormat
Expand Down Expand Up @@ -88,7 +89,7 @@ class HomeFragment(private val viewModel: MainViewModel) : BaseFragment(), OnLau
super.onResume()
updateClock()

lifecycleScope.launch {
lifecycleScope.launch(Dispatchers.IO) {
getUnlauncherDataSource().unlauncherAppsRepo.setApps(getInstalledApps())
}
if (!::appDrawerAdapter.isInitialized) {
Expand Down

0 comments on commit 561ab43

Please sign in to comment.