mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-23 19:55:11 +00:00
trying to delete cache directory
This commit is contained in:
parent
600ce16a03
commit
933682a558
3 changed files with 3 additions and 7 deletions
|
@ -45,9 +45,7 @@ open class Main: BaseActivity() {
|
|||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
try {
|
||||
val cacheDir: File = cacheDir
|
||||
if (cacheDir.isDirectory)
|
||||
cacheDir.delete()
|
||||
cacheDir.deleteRecursively()
|
||||
} catch (e: Exception) {
|
||||
Log.d("VMCache", "Unable to delete cacheDir")
|
||||
}
|
||||
|
|
|
@ -43,9 +43,7 @@ open class Home : BaseFragment() {
|
|||
|
||||
vancedinstallbtn.setOnClickListener {
|
||||
try {
|
||||
val cacheDir: File? = activity?.cacheDir
|
||||
if (cacheDir?.isDirectory!!)
|
||||
cacheDir.delete()
|
||||
activity?.cacheDir?.deleteRecursively()
|
||||
} catch (e: Exception) {
|
||||
Log.d("VMCache", "Unable to delete cacheDir")
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ class HomeFragment : Home() {
|
|||
microginstallbtn?.text = getString(R.string.update)
|
||||
}
|
||||
microgRemoteVer == microgVer -> {
|
||||
microginstallbtn?.text = getString(R.string.update)
|
||||
microginstallbtn?.text = getString(R.string.button_installed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue