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() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
try { try {
val cacheDir: File = cacheDir cacheDir.deleteRecursively()
if (cacheDir.isDirectory)
cacheDir.delete()
} catch (e: Exception) { } catch (e: Exception) {
Log.d("VMCache", "Unable to delete cacheDir") Log.d("VMCache", "Unable to delete cacheDir")
} }

View file

@ -43,9 +43,7 @@ open class Home : BaseFragment() {
vancedinstallbtn.setOnClickListener { vancedinstallbtn.setOnClickListener {
try { try {
val cacheDir: File? = activity?.cacheDir activity?.cacheDir?.deleteRecursively()
if (cacheDir?.isDirectory!!)
cacheDir.delete()
} catch (e: Exception) { } catch (e: Exception) {
Log.d("VMCache", "Unable to delete cacheDir") Log.d("VMCache", "Unable to delete cacheDir")
} }

View file

@ -92,7 +92,7 @@ class HomeFragment : Home() {
microginstallbtn?.text = getString(R.string.update) microginstallbtn?.text = getString(R.string.update)
} }
microgRemoteVer == microgVer -> { microgRemoteVer == microgVer -> {
microginstallbtn?.text = getString(R.string.update) microginstallbtn?.text = getString(R.string.button_installed)
} }
} }
} }