diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6f402b8b0..3481942e4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -56,7 +56,7 @@ , failedUpdates: List): String { - return with(StringBuilder()) { + return buildString { if (updates.isEmpty()) { append(getString(R.string.notification_no_new_chapters)) append("\n") @@ -327,7 +327,7 @@ class LibraryUpdateService : Service() { append(getString(R.string.notification_new_chapters)) for (manga in updates) { append("\n") - append(manga.title.chop(30)) + append(manga.title.chop(45)) } } if (!failedUpdates.isEmpty()) { @@ -335,10 +335,9 @@ class LibraryUpdateService : Service() { append(getString(R.string.notification_manga_update_failed)) for (manga in failedUpdates) { append("\n") - append(manga.title.chop(30)) + append(manga.title.chop(45)) } } - toString() } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/ChangelogDialogFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/ChangelogDialogFragment.kt index 0eeb10bc2..db7eee11b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/ChangelogDialogFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/ChangelogDialogFragment.kt @@ -26,6 +26,8 @@ class ChangelogDialogFragment : DialogFragment() { ChangelogDialogFragment().show(fm, "changelog") // TODO better upgrades management + if (oldVersion == 0) return + if (oldVersion < 14) { // Restore jobs after upgrading to evernote's job scheduler. if (BuildConfig.INCLUDE_UPDATER && preferences.automaticUpdates()) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/notification/ImageNotificationReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/notification/ImageNotificationReceiver.kt index d3a4d1365..09377f77c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/notification/ImageNotificationReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/notification/ImageNotificationReceiver.kt @@ -6,6 +6,7 @@ import android.content.Context import android.content.Intent import android.net.Uri import android.support.v4.content.FileProvider +import eu.kanade.tachiyomi.BuildConfig import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.notificationManager import java.io.File @@ -61,7 +62,7 @@ class ImageNotificationReceiver : BroadcastReceiver() { private fun showImage(context: Context, path: String) { val intent = Intent(Intent.ACTION_VIEW).apply { flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK or Intent.FLAG_GRANT_READ_URI_PERMISSION - val uri = FileProvider.getUriForFile(context, "eu.kanade.tachiyomi.provider", File(path)) + val uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", File(path)) setDataAndType(uri, "image/*") } context.startActivity(intent) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadsFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadsFragment.kt index d3d5b0692..64c217d90 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadsFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadsFragment.kt @@ -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") }