exclude facebook stickers by default
This commit is contained in:
parent
15f6d18f46
commit
ae91cfda72
3 changed files with 21 additions and 0 deletions
|
@ -400,10 +400,26 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
}.start()
|
||||
}
|
||||
|
||||
private fun checkDefaultSpamFolders() {
|
||||
if (!config.spamFoldersChecked) {
|
||||
val spamFolders = arrayListOf(
|
||||
"/storage/emulated/0/Android/data/com.facebook.orca/files/stickers"
|
||||
)
|
||||
|
||||
spamFolders.forEach {
|
||||
if (File(it).exists()) {
|
||||
config.addExcludedFolder(it)
|
||||
}
|
||||
}
|
||||
config.spamFoldersChecked = true
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryLoadGallery() {
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
checkOTGPath()
|
||||
checkDefaultSpamFolders()
|
||||
|
||||
if (config.showAll) {
|
||||
showAllMedia()
|
||||
|
|
|
@ -471,4 +471,8 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
var showNotch: Boolean
|
||||
get() = prefs.getBoolean(SHOW_NOTCH, true)
|
||||
set(showNotch) = prefs.edit().putBoolean(SHOW_NOTCH, showNotch).apply()
|
||||
|
||||
var spamFoldersChecked: Boolean
|
||||
get() = prefs.getBoolean(SPAM_FOLDERS_CHECKED, false)
|
||||
set(spamFoldersChecked) = prefs.edit().putBoolean(SPAM_FOLDERS_CHECKED, spamFoldersChecked).apply()
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ const val LAST_EDITOR_DRAW_COLOR = "last_editor_draw_color"
|
|||
const val LAST_EDITOR_BRUSH_SIZE = "last_editor_brush_size"
|
||||
const val SHOW_NOTCH = "show_notch"
|
||||
const val FILE_LOADING_PRIORITY = "file_loading_priority"
|
||||
const val SPAM_FOLDERS_CHECKED = "spam_folders_checked"
|
||||
|
||||
// slideshow
|
||||
const val SLIDESHOW_INTERVAL = "slideshow_interval"
|
||||
|
|
Loading…
Reference in a new issue