mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-07-29 23:29:50 +00:00
Fix: Root Installer Freeze (Again)
Improve: Default Uninstaller moved
This commit is contained in:
@ -15,6 +15,7 @@ import android.widget.FrameLayout
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@ -34,6 +35,8 @@ import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Observable
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class ProductFragment() : ScreenFragment(), ProductAdapter.Callbacks {
|
||||
companion object {
|
||||
@ -382,11 +385,13 @@ class ProductFragment() : ScreenFragment(), ProductAdapter.Callbacks {
|
||||
(recyclerView?.adapter as? ProductAdapter)?.setStatus(status)
|
||||
if (state is DownloadService.State.Success && isResumed) {
|
||||
state.consume()
|
||||
AppInstaller
|
||||
.getInstance(context)?.defaultInstaller?.install(
|
||||
"",
|
||||
state.release.cacheFileName
|
||||
)
|
||||
viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO){
|
||||
AppInstaller
|
||||
.getInstance(context)?.defaultInstaller?.install(
|
||||
"",
|
||||
state.release.cacheFileName
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user