Minor changes and fixes

This commit is contained in:
len
2016-12-03 13:08:26 +01:00
parent d10bf45283
commit f514d466a6
5 changed files with 11 additions and 8 deletions
@@ -83,10 +83,11 @@ class SettingsDownloadsFragment : SettingsFragment() {
subscriptions += preferences.downloadsDirectory().asObservable()
.subscribe { path ->
downloadDirPref.summary = path
val dir = UniFile.fromUri(context, Uri.parse(path))
downloadDirPref.summary = dir.filePath ?: path
// Don't display downloaded chapters in gallery apps creating a ".nomedia" file.
val dir = UniFile.fromUri(context, Uri.parse(path))
if (dir != null && dir.exists()) {
dir.createFile(".nomedia")
}