mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
try ensuring that the screenshots folders is properly added to the mediastore
This commit is contained in:
parent
f8713c1208
commit
e994b77232
1 changed files with 12 additions and 0 deletions
|
@ -5,6 +5,7 @@ import android.content.ClipData
|
|||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.os.Handler
|
||||
import android.provider.MediaStore
|
||||
import android.support.v7.widget.GridLayoutManager
|
||||
|
@ -283,6 +284,17 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
gotDirectories(addTempFolderIfNeeded(it), false)
|
||||
}
|
||||
mCurrAsyncTask!!.execute()
|
||||
|
||||
// try ensuring that the screenshots folders is properly added to the mediastore
|
||||
if (config.appRunCount < 5) {
|
||||
Thread {
|
||||
val pictures = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)
|
||||
val screenshots = File(pictures, "Screenshots")
|
||||
if (screenshots.exists()) {
|
||||
scanFile(screenshots)
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSortingDialog() {
|
||||
|
|
Loading…
Reference in a new issue