adding some default folders to scan
This commit is contained in:
parent
bcae7cfd76
commit
fa2eb4f7ed
|
@ -47,7 +47,7 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:4.4.21'
|
implementation 'com.simplemobiletools:commons:4.4.24'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.helpers
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
|
import android.os.Environment
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import com.simplemobiletools.commons.helpers.BaseConfig
|
import com.simplemobiletools.commons.helpers.BaseConfig
|
||||||
|
@ -367,6 +368,12 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
|
|
||||||
// if a user hides a folder, then enables temporary hidden folder displaying, make sure we show it properly
|
// if a user hides a folder, then enables temporary hidden folder displaying, make sure we show it properly
|
||||||
var everShownFolders: Set<String>
|
var everShownFolders: Set<String>
|
||||||
get() = prefs.getStringSet(EVER_SHOWN_FOLDERS, HashSet<String>())
|
get() = prefs.getStringSet(EVER_SHOWN_FOLDERS, getEverShownFolders())
|
||||||
set(everShownFolders) = prefs.edit().putStringSet(EVER_SHOWN_FOLDERS, everShownFolders).apply()
|
set(everShownFolders) = prefs.edit().putStringSet(EVER_SHOWN_FOLDERS, everShownFolders).apply()
|
||||||
|
|
||||||
|
fun getEverShownFolders() = hashSetOf(
|
||||||
|
internalStoragePath,
|
||||||
|
Environment.DIRECTORY_DCIM,
|
||||||
|
Environment.DIRECTORY_PICTURES
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue