0
0
Fork 0
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:
X1nto 2020-05-24 23:41:03 +04:00
parent 600ce16a03
commit 933682a558
3 changed files with 3 additions and 7 deletions

View file

@ -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")
}

View file

@ -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")
}

View file

@ -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)
}
}
}