File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
app/src/main/kotlin/com/simplemobiletools/filemanager/activities Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ class MainActivity : SimpleActivity() {
5252
5353 if (savedInstanceState == null ) {
5454 tryInitFileManager()
55+ checkWhatsNewDialog()
56+ checkIfRootAvailable()
57+ checkInvalidFavorites()
5558 }
56-
57- checkWhatsNewDialog()
58- checkIfRootAvailable()
5959 }
6060
6161 override fun onStop () {
@@ -285,6 +285,16 @@ class MainActivity : SimpleActivity() {
285285 }.start()
286286 }
287287
288+ private fun checkInvalidFavorites () {
289+ Thread {
290+ config.favorites.forEach {
291+ if (! it.startsWith(OTG_PATH ) && ! isPathOnSD(it) && ! getDoesFilePathExist(it)) {
292+ config.removeFavorite(it)
293+ }
294+ }
295+ }.start()
296+ }
297+
288298 fun pickedPath (path : String ) {
289299 val resultIntent = Intent ()
290300 val uri = getFilePublicUri(File (path), BuildConfig .APPLICATION_ID )
You can’t perform that action at this time.
0 commit comments