some fixes
This commit is contained in:
parent
d942f82dc5
commit
fde076023f
|
@ -1,6 +1,5 @@
|
|||
package com.vanced.manager.core.base
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.view.View
|
||||
|
@ -35,7 +34,6 @@ open class BaseFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
fun downloadSplit(apk: String, apkVar: String, isInstalling: Boolean, loadBar: ProgressBar, navigate: Int) {
|
||||
val baseurl = "https://x1nto.github.io/VancedFiles/Splits/"
|
||||
val url: String =
|
||||
|
@ -46,9 +44,6 @@ open class BaseFragment : Fragment() {
|
|||
else -> return
|
||||
}
|
||||
|
||||
if (url.file().exists())
|
||||
url.file().delete()
|
||||
|
||||
activity?.filesDir?.path?.let {
|
||||
Task(url = url, saveName = getFileNameFromUrl(url), savePath = it)
|
||||
.download()
|
||||
|
@ -59,10 +54,10 @@ open class BaseFragment : Fragment() {
|
|||
loadBar.progress = progress.percent().toInt()
|
||||
},
|
||||
onComplete = {
|
||||
if (isInstalling) {
|
||||
//if (isInstalling) {
|
||||
//So we should implement installation here.
|
||||
//That will be done later
|
||||
}
|
||||
//}
|
||||
view?.findNavController()?.navigate(navigate)
|
||||
},
|
||||
onError = { throwable ->
|
||||
|
|
|
@ -21,7 +21,7 @@ open class ThemedActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
pref = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
currentTheme = pref.getString("theme_mode", "LIGHT").toString()
|
||||
currentTheme = pref.getString("theme_mode", "").toString()
|
||||
|
||||
setFinalTheme(currentTheme)
|
||||
super.onCreate(savedInstanceState)
|
||||
|
|
Loading…
Reference in New Issue