diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt index fa359febd5..9f8db886be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt @@ -187,7 +187,7 @@ class NotificationReceiver : BroadcastReceiver() { } context.startActivity(intent) } else { - context.toast(context.getString(R.string.chapter_error)) + context.toast(R.string.chapter_error) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt index 51e2915781..a0df5444d0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt @@ -239,8 +239,8 @@ open class BrowseSourcePresenter( var new = manga.copy( favorite = !manga.favorite, dateAdded = when (manga.favorite) { - true -> Date().time - false -> 0 + true -> 0 + false -> Date().time }, ) @@ -272,7 +272,6 @@ open class BrowseSourcePresenter( moveMangaToCategories(manga, defaultCategory) changeMangaFavorite(manga) - // activity.toast(activity.getString(R.string.manga_added_library)) } // Automatic 'Default' or no categories @@ -280,7 +279,6 @@ open class BrowseSourcePresenter( moveMangaToCategories(manga) changeMangaFavorite(manga) - // activity.toast(activity.getString(R.string.manga_added_library)) } // Choose a category diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index c8e4f7e4ad..696d4e082c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -256,13 +256,13 @@ class MangaController : FullComposeController { private fun onFavoriteClick() { presenter.toggleFavorite( onRemoved = this::onFavoriteRemoved, - onAdded = { activity?.toast(activity?.getString(R.string.manga_added_library)) }, + onAdded = { activity?.toast(R.string.manga_added_library) }, ) } private fun onFavoriteRemoved() { val context = activity ?: return - context.toast(activity?.getString(R.string.manga_removed_library)) + context.toast(R.string.manga_removed_library) viewScope.launch { if (!presenter.hasDownloads()) return@launch val result = snackbarHostState.showSnackbar( @@ -367,7 +367,7 @@ class MangaController : FullComposeController { fun onFetchChaptersError(error: Throwable) { if (error is NoChaptersException) { - activity?.toast(activity?.getString(R.string.no_chapters_error)) + activity?.toast(R.string.no_chapters_error) } else { activity?.toast(error.message) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt index 73637770d1..516c6389ac 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt @@ -46,7 +46,7 @@ class SetChapterSettingsDialog(bundle: Bundle? = null) : DialogController(bundle } } - activity?.toast(activity!!.getString(R.string.chapter_settings_updated)) + activity?.toast(R.string.chapter_settings_updated) } .setNegativeButton(android.R.string.cancel, null) .create()