diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt index 46c97f9d4f..6d08ea983e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt @@ -31,7 +31,7 @@ interface Category : Serializable { fun sortingMode(): Int? = when (mangaSort) { ALPHA_ASC, ALPHA_DSC -> LibrarySort.ALPHA - UPDATED_ASC, UPDATED_DSC -> LibrarySort.LAST_UPDATED + UPDATED_ASC, UPDATED_DSC -> LibrarySort.LATEST_CHAPTER UNREAD_ASC, UNREAD_DSC -> LibrarySort.UNREAD LAST_READ_ASC, LAST_READ_DSC -> LibrarySort.LAST_READ TOTAL_ASC, TOTAL_DSC -> LibrarySort.TOTAL @@ -41,7 +41,7 @@ interface Category : Serializable { fun sortRes(): Int = when (mangaSort) { ALPHA_ASC, ALPHA_DSC -> R.string.title - UPDATED_ASC, UPDATED_DSC -> R.string.action_sort_last_updated + UPDATED_ASC, UPDATED_DSC -> R.string.action_sort_latest_chapter UNREAD_ASC, UNREAD_DSC -> R.string.action_filter_unread LAST_READ_ASC, LAST_READ_DSC -> R.string.action_sort_last_read TOTAL_ASC, TOTAL_DSC -> R.string.action_sort_total @@ -60,7 +60,7 @@ interface Category : Serializable { fun changeSortTo(sort: Int) { mangaSort = when (sort) { LibrarySort.ALPHA -> ALPHA_ASC - LibrarySort.LAST_UPDATED -> UPDATED_ASC + LibrarySort.LATEST_CHAPTER -> UPDATED_ASC LibrarySort.UNREAD -> UNREAD_ASC LibrarySort.LAST_READ -> LAST_READ_ASC LibrarySort.TOTAL -> ALPHA_ASC @@ -96,7 +96,7 @@ interface Category : Serializable { id = -1 mangaSort = when (libSort) { LibrarySort.ALPHA -> ALPHA_ASC - LibrarySort.LAST_UPDATED -> UPDATED_ASC + LibrarySort.LATEST_CHAPTER -> UPDATED_ASC LibrarySort.UNREAD -> UNREAD_ASC LibrarySort.LAST_READ -> LAST_READ_ASC LibrarySort.TOTAL -> TOTAL_ASC diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Chapter.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Chapter.kt index 9d302b9d27..133bb520fe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Chapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Chapter.kt @@ -33,8 +33,9 @@ interface Chapter : SChapter, Serializable { chapter_number = -1f } - fun createH(): Chapter = ChapterImpl().apply { + fun createHeader(isExpanded: Boolean): Chapter = ChapterImpl().apply { id = Long.MIN_VALUE + read = isExpanded manga_id = null } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt index c1351872d3..46bbd95246 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt @@ -39,6 +39,11 @@ interface Manga : SManga { val sourceName = Injekt.get().getOrStub(source).name val currentTags = currentGenres()?.split(",")?.map { it.trim().toLowerCase(Locale.US) } return if (currentTags?.any + { tag -> + tag.startsWith("japanese") || tag == "manga" + } == true) + TYPE_MANGA + else if (currentTags?.any { tag -> tag.startsWith("english") || tag == "comic" } == true || isComicSource(sourceName)) @@ -51,10 +56,14 @@ interface Manga : SManga { TYPE_MANHUA else if (currentTags?.any { tag -> - tag == "long strip" || tag == "manhwa" || - tag.contains("webtoon") + tag == "long strip" || tag == "manhwa" } == true || isWebtoonSource(sourceName)) TYPE_MANHWA + else if (currentTags?.any + { tag -> + tag.startsWith("webtoon") + } == true) + TYPE_WEBTOON else TYPE_MANGA } @@ -65,7 +74,8 @@ interface Manga : SManga { { tag -> tag == "long strip" || tag == "manhwa" || tag.contains("webtoon") - } == true || isWebtoonSource(sourceName)) + } == true || isWebtoonSource(sourceName) || + sourceName.contains("tapastic", true)) ReaderActivity.WEBTOON else if (currentTags?.any { tag -> @@ -142,14 +152,11 @@ interface Manga : SManga { const val DISPLAY_NUMBER = 0x00100000 const val DISPLAY_MASK = 0x00100000 - const val READ_WEBTOON = 0 - const val READ_LTR = 1 - const val READ_RTL = 2 - const val TYPE_MANGA = 0 const val TYPE_MANHWA = 1 const val TYPE_MANHUA = 2 const val TYPE_COMIC = 3 + const val TYPE_WEBTOON = 4 fun create(source: Long): Manga = MangaImpl().apply { this.source = source diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt index fa2ce407c4..1975ab8037 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt @@ -139,7 +139,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) : else "Read" } - LibrarySort.LAST_UPDATED -> { + LibrarySort.LATEST_CHAPTER -> { val lastUpdate = (iFlexible as LibraryItem).manga.last_update if (lastUpdate > 0) getShortDate(Date(lastUpdate)) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index f0b4489018..2021dd618f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -86,8 +86,6 @@ open class LibraryController( */ protected var query = "" - var customQuery = "" - /** * Currently selected mangas. */ @@ -258,24 +256,6 @@ open class LibraryController( } } - override fun onChangeEnded( - changeHandler: ControllerChangeHandler, - changeType: ControllerChangeType - ) { - super.onChangeEnded(changeHandler, changeType) - if (changeType.isEnter) { - if (customQuery.isNotEmpty()) { - query = customQuery - ((activity as MainActivity).toolbar.menu.findItem( - R.id.action_search - )?.actionView as? SearchView)?.setQuery( - customQuery, true - ) - } - customQuery = "" - } - } - override fun onActivityResumed(activity: Activity) { super.onActivityResumed(activity) if (observeLater && ::presenter.isInitialized) { @@ -509,7 +489,7 @@ open class LibraryController( } open fun search(query: String) { - this.customQuery = query + onSearch(query) } override fun handleRootBack(): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt index 8924e993cf..b8063c7e07 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt @@ -100,7 +100,7 @@ class LibraryHeaderItem(private val categoryF: (Int) -> Category, val catId: Int sortText.text = itemView.context.getString(R.string.sort_by_, itemView.context.getString( when (category.sortingMode()) { - LibrarySort.LAST_UPDATED -> R.string.action_sort_last_updated + LibrarySort.LATEST_CHAPTER -> R.string.action_sort_latest_chapter LibrarySort.DRAG_AND_DROP -> if (category.id == -1) R.string.category else R.string.action_sort_drag_and_drop @@ -168,7 +168,7 @@ class LibraryHeaderItem(private val categoryF: (Int) -> Category, val catId: Int LibrarySort.TOTAL -> R.id.action_total_chaps LibrarySort.LAST_READ -> R.id.action_last_read LibrarySort.UNREAD -> R.id.action_unread - LibrarySort.LAST_UPDATED -> R.id.action_update + LibrarySort.LATEST_CHAPTER -> R.id.action_update else -> R.id.action_alpha } ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt index 6d99e585bb..fc295945c8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt @@ -245,11 +245,11 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle), } override fun reattachAdapter() { + libraryLayout = preferences.libraryLayout().getOrDefault() if (libraryLayout == 0) recycler.spanCount = 1 else recycler.columnWidth = (90 + (preferences.gridSize().getOrDefault() * 30)).dpToPx val position = (recycler.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition() - libraryLayout = preferences.libraryLayout().getOrDefault() recycler.adapter = adapter (recycler.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(position, 0) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index 5e4f388427..d152c92ba9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -170,7 +170,10 @@ class LibraryPresenter( if (filterUnread == STATE_REALLY_EXCLUDE && item.manga.unread > 0) return@f false if (filterMangaType > 0) { - if (filterMangaType != item.manga.mangaType()) return@f false + if (if (filterMangaType == Manga.TYPE_MANHWA) + (filterMangaType != item.manga.mangaType() && + filterMangaType != Manga.TYPE_WEBTOON) + else filterMangaType != item.manga.mangaType()) return@f false } if (filterCompleted == STATE_INCLUDE && item.manga.status != SManga.COMPLETED) @@ -297,7 +300,7 @@ class LibraryPresenter( val manga2LastRead = lastReadManga[i2.manga.id!!] ?: lastReadManga.size manga1LastRead.compareTo(manga2LastRead) } - sortingMode == LibrarySort.LAST_UPDATED -> i2.manga.last_update.compareTo(i1 + sortingMode == LibrarySort.LATEST_CHAPTER -> i2.manga.last_update.compareTo(i1 .manga.last_update) sortingMode == LibrarySort.UNREAD -> when { @@ -364,7 +367,7 @@ class LibraryPresenter( category.mangaSort != null -> { var sort = when (category.sortingMode()) { LibrarySort.ALPHA -> sortAlphabetical(i1, i2) - LibrarySort.LAST_UPDATED -> i2.manga.last_update.compareTo(i1.manga.last_update) + LibrarySort.LATEST_CHAPTER -> i2.manga.last_update.compareTo(i1.manga.last_update) LibrarySort.UNREAD -> when { i1.manga.unread == i2.manga.unread -> 0 i1.manga.unread == 0 -> if (category.isAscending()) 1 else -1 diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt index 4514afdb0c..8e0f0c5d13 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt @@ -4,7 +4,7 @@ object LibrarySort { const val ALPHA = 0 const val LAST_READ = 1 - const val LAST_UPDATED = 2 + const val LATEST_CHAPTER = 2 const val UNREAD = 3 const val TOTAL = 4 const val DRAG_AND_DROP = 6 diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt index 4d13eb27d8..06eb1ad757 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt @@ -1,5 +1,9 @@ package eu.kanade.tachiyomi.ui.manga +import android.animation.Animator +import android.animation.AnimatorListenerAdapter +import android.animation.AnimatorSet +import android.animation.ObjectAnimator import android.animation.ValueAnimator import android.app.Activity import android.app.PendingIntent @@ -10,6 +14,7 @@ import android.content.Intent import android.content.res.Configuration import android.graphics.Bitmap import android.graphics.Color +import android.graphics.Rect import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.Drawable import android.os.Build @@ -21,6 +26,7 @@ import android.view.MenuInflater import android.view.MenuItem import android.view.View import android.view.ViewGroup +import android.view.animation.DecelerateInterpolator import androidx.appcompat.widget.PopupMenu import androidx.core.content.pm.ShortcutInfoCompat import androidx.core.content.pm.ShortcutManagerCompat @@ -29,6 +35,11 @@ import androidx.core.graphics.drawable.IconCompat import androidx.palette.graphics.Palette import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import androidx.transition.ChangeBounds +import androidx.transition.ChangeImageTransform +import androidx.transition.TransitionManager +import androidx.transition.TransitionSet import com.afollestad.materialdialogs.MaterialDialog import com.bluelinelabs.conductor.ControllerChangeHandler import com.bluelinelabs.conductor.ControllerChangeType @@ -65,6 +76,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaController.Companion.FROM_CATALOGUE_EXT import eu.kanade.tachiyomi.ui.manga.chapter.ChapterItem import eu.kanade.tachiyomi.ui.manga.chapter.ChapterMatHolder import eu.kanade.tachiyomi.ui.manga.chapter.ChaptersAdapter +import eu.kanade.tachiyomi.ui.manga.chapter.DownloadCustomChaptersDialog import eu.kanade.tachiyomi.ui.manga.info.EditMangaDialog import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate @@ -83,8 +95,7 @@ import jp.wasabeef.glide.transformations.CropSquareTransformation import jp.wasabeef.glide.transformations.MaskTransformation import kotlinx.android.synthetic.main.main_activity.* import kotlinx.android.synthetic.main.manga_details_controller.* -import kotlinx.android.synthetic.main.manga_details_controller.swipe_refresh -import kotlinx.android.synthetic.main.manga_info_controller.* +import kotlinx.android.synthetic.main.manga_header_item.* import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.io.File @@ -94,6 +105,7 @@ class MangaDetailsController : BaseController, FlexibleAdapter.OnItemLongClickListener, ChaptersAdapter.MangaHeaderInterface, ChangeMangaCategoriesDialog.Listener, + DownloadCustomChaptersDialog.Listener, NoToolbarElevationController { constructor(manga: Manga?, @@ -129,12 +141,17 @@ class MangaDetailsController : BaseController, var coverColor:Int? = null var toolbarIsColored = false private var snack: Snackbar? = null - private val fromCatalogue = args.getBoolean(FROM_CATALOGUE_EXTRA, false) + val fromCatalogue = args.getBoolean(FROM_CATALOGUE_EXTRA, false) + var coverDrawable:Drawable? = null /** * Adapter containing a list of chapters. */ private var adapter: ChaptersAdapter? = null + // Hold a reference to the current animator, + // so that it can be canceled mid-way. + private var currentAnimator: Animator? = null + var headerHeight = 0 init { @@ -183,8 +200,10 @@ class MangaDetailsController : BaseController, } presenter.onCreate() - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - recycler.setOnScrollChangeListener { _, _, _, _, _ -> + + recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() { + override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { + super.onScrolled(recyclerView, dx, dy) val atTop = !recycler.canScrollVertically(-1) if ((!atTop && !toolbarIsColored) || (atTop && toolbarIsColored)) { toolbarIsColored = !atTop @@ -194,10 +213,10 @@ class MangaDetailsController : BaseController, if (colorAnimator?.isRunning == true) activity?.window?.statusBarColor ?: color else ColorUtils.setAlphaComponent( - color, if (toolbarIsColored) 0 else 255 + color, if (toolbarIsColored) 0 else 175 ) val colorTo = ColorUtils.setAlphaComponent( - color, if (toolbarIsColored) 255 else 0 + color, if (toolbarIsColored) 175 else 0 ) colorAnimator?.cancel() colorAnimator = ValueAnimator.ofObject( @@ -209,13 +228,19 @@ class MangaDetailsController : BaseController, activity?.window?.statusBarColor = (animator.animatedValue as Int) } colorAnimator?.start() - val isCurrentController = router?.backstack?.lastOrNull()?.controller() == this + val isCurrentController = + router?.backstack?.lastOrNull()?.controller() == this@MangaDetailsController if (isCurrentController) setTitle() } } - } + }) setPaletteColor() + if (manga?.initialized != true) + swipe_refresh.post { + swipe_refresh.isRefreshing = true + } + swipe_refresh.setOnRefreshListener { presenter.refreshAll() } @@ -230,6 +255,7 @@ class MangaDetailsController : BaseController, override fun onResourceReady(resource: Drawable, transition: Transition? ) { + coverDrawable = resource Palette.from( (resource as BitmapDrawable).bitmap).generate { if (recycler == null) return@generate @@ -247,8 +273,9 @@ class MangaDetailsController : BaseController, (recycler.findViewHolderForAdapterPosition(0) as? MangaHeaderHolder) ?.setBackDrop(backDropColor) if (toolbarIsColored) { - (activity as MainActivity).toolbar.setBackgroundColor(backDropColor) - activity?.window?.statusBarColor = backDropColor + val translucentColor = ColorUtils.setAlphaComponent(backDropColor, 175) + (activity as MainActivity).toolbar.setBackgroundColor(translucentColor) + activity?.window?.statusBarColor = translucentColor } } } @@ -370,6 +397,7 @@ class MangaDetailsController : BaseController, R.id.action_bookmark -> bookmarkChapters(chapters, true) R.id.action_remove_bookmark -> bookmarkChapters(chapters, false) R.id.action_mark_as_read -> markAsRead(chapters) + R.id.action_mark_previous_as_read -> markPreviousAsRead(item) R.id.action_mark_as_unread -> markAsUnread(chapters) } true @@ -379,6 +407,15 @@ class MangaDetailsController : BaseController, popup.show() } + private fun markPreviousAsRead(chapter: ChapterItem) { + val adapter = adapter ?: return + val chapters = if (presenter.sortDescending()) adapter.items.reversed() else adapter.items + val chapterPos = chapters.indexOf(chapter) + if (chapterPos != -1) { + markAsRead(chapters.take(chapterPos)) + } + } + private fun bookmarkChapters(chapters: List, bookmarked: Boolean) { //destroyActionModeIfNeeded() presenter.bookmarkChapters(chapters, bookmarked) @@ -417,6 +454,8 @@ class MangaDetailsController : BaseController, menu.findItem(R.id.action_download).isVisible = !presenter.isLockedFromSearch menu.findItem(R.id.action_mark_all_as_read).isVisible = presenter.getNextUnreadChapter() != null && !presenter.isLockedFromSearch + menu.findItem(R.id.action_mark_all_as_unread).isVisible = + !presenter.allUnread() && !presenter.isLockedFromSearch } override fun onOptionsItemSelected(item: MenuItem): Boolean { @@ -434,6 +473,7 @@ class MangaDetailsController : BaseController, .negativeButton(android.R.string.cancel) .show() } + R.id.action_mark_all_as_unread -> markAsUnread(presenter.chapters) R.id.download_next, R.id.download_next_5, R.id.download_next_10, R.id.download_custom, R.id.download_unread, R.id.download_all -> downloadChapters(item.itemId) @@ -446,7 +486,7 @@ class MangaDetailsController : BaseController, * Called to run Intent with [Intent.ACTION_SEND], which show share dialog. */ override fun prepareToShareManga() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && manga_cover.drawable != null) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && coverDrawable != null) GlideApp.with(activity!!).asBitmap().load(presenter.manga).into(object : CustomTarget() { override fun onResourceReady(resource: Bitmap, transition: Transition?) { @@ -486,7 +526,7 @@ class MangaDetailsController : BaseController, } } - private fun openInWebView() { + override fun openInWebView() { val source = presenter.source as? HttpSource ?: return val url = try { @@ -626,7 +666,14 @@ class MangaDetailsController : BaseController, } private fun showCustomDownloadDialog() { - // DownloadCustomChaptersDialog(this, presenter.chapters.size).showDialog(router) + DownloadCustomChaptersDialog(this, presenter.chapters.size).showDialog(router) + } + + override fun downloadCustomChapters(amount: Int) { + val chaptersToDownload = presenter.getUnreadChaptersSorted().take(amount) + if (chaptersToDownload.isNotEmpty()) { + downloadChapters(chaptersToDownload) + } } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { @@ -710,32 +757,52 @@ class MangaDetailsController : BaseController, } } else { - if (presenter.toggleFavorite()) { - val categories = presenter.getCategories() - val defaultCategoryId = presenter.preferences.defaultCategory() - val defaultCategory = categories.find { it.id == defaultCategoryId } - when { - defaultCategory != null -> presenter.moveMangaToCategory(manga, defaultCategory) - defaultCategoryId == 0 || categories.isEmpty() -> // 'Default' or no category - presenter.moveMangaToCategory(manga, null) - else -> { - val ids = presenter.getMangaCategoryIds(manga) - val preselected = ids.mapNotNull { id -> - categories.indexOfFirst { it.id == id }.takeIf { it != -1 } - }.toTypedArray() - - ChangeMangaCategoriesDialog( - this, - listOf(manga), - categories, - preselected - ).showDialog(router) - } - } - showAddedSnack() - } else { - showRemovedSnack() + if (!manga.favorite) { + toggleMangaFavorite() } + else { + val headerHolder = recycler.findViewHolderForAdapterPosition(0) as? MangaHeaderHolder ?: + return + val popup = PopupMenu(view!!.context, headerHolder.favorite_button) + popup.menu.add(R.string.remove_from_library) + + // Set a listener so we are notified if a menu item is clicked + popup.setOnMenuItemClickListener { + toggleMangaFavorite() + true + } + popup.show() + } + } + } + + private fun toggleMangaFavorite() { + val manga = presenter.manga + if (presenter.toggleFavorite()) { + val categories = presenter.getCategories() + val defaultCategoryId = presenter.preferences.defaultCategory() + val defaultCategory = categories.find { it.id == defaultCategoryId } + when { + defaultCategory != null -> presenter.moveMangaToCategory(manga, defaultCategory) + defaultCategoryId == 0 || categories.isEmpty() -> // 'Default' or no category + presenter.moveMangaToCategory(manga, null) + else -> { + val ids = presenter.getMangaCategoryIds(manga) + val preselected = ids.mapNotNull { id -> + categories.indexOfFirst { it.id == id }.takeIf { it != -1 } + }.toTypedArray() + + ChangeMangaCategoriesDialog( + this, + listOf(manga), + categories, + preselected + ).showDialog(router) + } + } + showAddedSnack() + } else { + showRemovedSnack() } } @@ -762,7 +829,9 @@ class MangaDetailsController : BaseController, } }) } - (activity as? MainActivity)?.setUndoSnackBar(snack, fab_favorite) + val favButton = (recycler.findViewHolderForAdapterPosition(0) + as? MangaHeaderHolder)?.favorite_button + (activity as? MainActivity)?.setUndoSnackBar(snack, favButton) } override fun mangaPresenter(): MangaDetailsPresenter = presenter @@ -775,19 +844,158 @@ class MangaDetailsController : BaseController, /** * Copies a string to clipboard * - * @param label Label to show to the user describing the content * @param content the actual text to copy to the board + * @param label Label to show to the user describing the content */ - private fun copyToClipboard(label: String, content: String, resId: Int) { + override fun copyToClipboard(content: String, label: Int) { if (content.isBlank()) return val activity = activity ?: return val view = view ?: return + val contentType = view.context.getString(label) val clipboard = activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager - clipboard.setPrimaryClip(ClipData.newPlainText(label, content)) + clipboard.setPrimaryClip(ClipData.newPlainText(contentType, content)) - snack = view.snack(view.context.getString(R.string.copied_to_clipboard, view.context - .getString(resId))) + snack = view.snack(view.context.getString(R.string.copied_to_clipboard, contentType)) + } + + override fun handleBack(): Boolean { + if (manga_cover_full?.visibility == View.VISIBLE) + { + manga_cover_full?.performClick() + return true + } + return super.handleBack() + } + + override fun zoomImageFromThumb(thumbView: View) { + // If there's an animation in progress, cancel it immediately and proceed with this one. + currentAnimator?.cancel() + + // Load the high-resolution "zoomed-in" image. + val expandedImageView = manga_cover_full ?: return + val fullBackdrop = full_backdrop + val image = coverDrawable ?: return + expandedImageView.setImageDrawable(image) + + // Hide the thumbnail and show the zoomed-in view. When the animation + // begins, it will position the zoomed-in view in the place of the + // thumbnail. + thumbView.alpha = 0f + expandedImageView.visibility = View.VISIBLE + fullBackdrop.visibility = View.VISIBLE + + // Set the pivot point to 0 to match thumbnail + + swipe_refresh.isEnabled = false + + val rect = Rect() + thumbView.getGlobalVisibleRect(rect) + expandedImageView.updateLayoutParams { + height = thumbView.height + width = thumbView.width + topMargin = rect.top + leftMargin = rect.left + rightMargin = rect.right + bottomMargin = rect.bottom + } + expandedImageView.requestLayout() + + expandedImageView.post { + val defMargin = 16.dpToPx + expandedImageView.updateLayoutParams { + height = ViewGroup.LayoutParams.MATCH_PARENT + width = ViewGroup.LayoutParams.MATCH_PARENT + topMargin = defMargin + headerHeight + leftMargin = defMargin + rightMargin = defMargin + bottomMargin = defMargin + recycler.paddingBottom + } + val shortAnimationDuration = resources?.getInteger( + android.R.integer.config_shortAnimTime + ) ?: 0 + + // TransitionSet for the full cover because using animation for this SUCKS + val transitionSet = TransitionSet() + val bound = ChangeBounds() + transitionSet.addTransition(bound) + val changeImageTransform = ChangeImageTransform() + transitionSet.addTransition(changeImageTransform) + transitionSet.duration = shortAnimationDuration.toLong() + TransitionManager.beginDelayedTransition(frame_layout, transitionSet) + + // AnimationSet for backdrop because idk how to use TransitionSet + currentAnimator = AnimatorSet().apply { + play( + ObjectAnimator.ofFloat(fullBackdrop, View.ALPHA, 0f, 0.5f) + ) + duration = shortAnimationDuration.toLong() + interpolator = DecelerateInterpolator() + addListener(object : AnimatorListenerAdapter() { + + override fun onAnimationEnd(animation: Animator) { + TransitionManager.endTransitions(frame_layout) + currentAnimator = null + } + + override fun onAnimationCancel(animation: Animator) { + TransitionManager.endTransitions(frame_layout) + currentAnimator = null + } + }) + start() + } + + expandedImageView.setOnClickListener { + currentAnimator?.cancel() + + val rect = Rect() + thumbView.getGlobalVisibleRect(rect) + expandedImageView.updateLayoutParams { + height = thumbView.height + width = thumbView.width + topMargin = rect.top + leftMargin = rect.left + rightMargin = rect.right + bottomMargin = rect.bottom + } + + // Zoom out back to tc thumbnail + val transitionSet = TransitionSet() + val bound = ChangeBounds() + transitionSet.addTransition(bound) + val changeImageTransform = ChangeImageTransform() + transitionSet.addTransition(changeImageTransform) + transitionSet.duration = shortAnimationDuration.toLong() + TransitionManager.beginDelayedTransition(frame_layout, transitionSet) + + // Animation to remove backdrop and hide the full cover + currentAnimator = AnimatorSet().apply { + play(ObjectAnimator.ofFloat(fullBackdrop, View.ALPHA, 0f)) + duration = shortAnimationDuration.toLong() + interpolator = DecelerateInterpolator() + addListener(object : AnimatorListenerAdapter() { + + override fun onAnimationEnd(animation: Animator) { + thumbView.alpha = 1f + expandedImageView.visibility = View.GONE + fullBackdrop.visibility = View.GONE + swipe_refresh.isEnabled = true + currentAnimator = null + } + + override fun onAnimationCancel(animation: Animator) { + thumbView.alpha = 1f + expandedImageView.visibility = View.GONE + fullBackdrop.visibility = View.GONE + swipe_refresh.isEnabled = true + currentAnimator = null + } + }) + start() + } + } + } } } \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt index b39da2d09b..1e4c66c524 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt @@ -28,7 +28,6 @@ import eu.kanade.tachiyomi.ui.manga.chapter.ChapterItem import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate import eu.kanade.tachiyomi.util.chapter.syncChaptersWithSource import eu.kanade.tachiyomi.util.storage.DiskUtil -import eu.kanade.tachiyomi.util.system.launchUI import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job @@ -67,7 +66,7 @@ class MangaDetailsPresenter(private val controller: MangaDetailsController, var chapters:List = emptyList() private set - var headerItem = ChapterItem(Chapter.createH(), manga) + var headerItem = ChapterItem(Chapter.createHeader(controller.fromCatalogue), manga) fun onCreate() { isLockedFromSearch = SecureActivityDelegate.shouldBeLocked() @@ -75,10 +74,9 @@ class MangaDetailsPresenter(private val controller: MangaDetailsController, downloadManager.addListener(this) LibraryUpdateService.setListener(this) if (!manga.initialized) { + isLoading = true + controller.setRefresh(true) controller.updateHeader() - launchUI { - controller.setRefresh(true) - } refreshAll() } else { @@ -243,11 +241,9 @@ class MangaDetailsPresenter(private val controller: MangaDetailsController, true -> { c1, c2 -> c2.chapter_number.compareTo(c1.chapter_number) } false -> { c1, c2 -> c1.chapter_number.compareTo(c2.chapter_number) } } - else -> throw NotImplementedError("Unimplemented sorting method") + else -> { c1, c2 -> c1.source_order.compareTo(c2.source_order) } } chapters = chapters.sortedWith(Comparator(sortFunction)) - //if (sortDescending()) - // chapters = chapters.reversed() return chapters } @@ -258,6 +254,8 @@ class MangaDetailsPresenter(private val controller: MangaDetailsController, return chapters.sortedByDescending { it.source_order }.find { !it.read } } + fun allUnread(): Boolean = chapters.none { it.read } + fun getUnreadChaptersSorted() = chapters .filter { !it.read && it.status == Download.NOT_DOWNLOADED } .distinctBy { it.name } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt index f590734d87..02c1f46768 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi.ui.manga +import android.annotation.SuppressLint import android.content.res.ColorStateList import android.graphics.Color import android.view.View @@ -27,9 +28,12 @@ import java.util.Locale class MangaHeaderHolder( private val view: View, - private val adapter: ChaptersAdapter + private val adapter: ChaptersAdapter, + startExpanded: Boolean ) : MangaChapterHolder(view, adapter) { + + init { start_reading_button.setOnClickListener { adapter.coverListener?.readNextChapter() } top_view.updateLayoutParams { @@ -49,7 +53,8 @@ class MangaHeaderHolder( filter_button.setOnClickListener { adapter.coverListener?.showChapterFilter() } filters_text.setOnClickListener { adapter.coverListener?.showChapterFilter() } chapters_title.setOnClickListener { adapter.coverListener?.showChapterFilter() } - share_button.setOnClickListener { adapter.coverListener?.prepareToShareManga() } + webview_button.setOnClickListener { adapter.coverListener?.openInWebView() } + share_button.setOnClickListener { adapter.coverListener?.prepareToShareManga() } favorite_button.setOnClickListener { adapter.coverListener?.favoriteManga(false) } @@ -57,6 +62,17 @@ class MangaHeaderHolder( adapter.coverListener?.favoriteManga(true) true } + manga_full_title.setOnLongClickListener { + adapter.coverListener?.copyToClipboard(manga_full_title.text.toString(), R.string.manga_info_full_title_label) + true + } + manga_author.setOnLongClickListener { + adapter.coverListener?.copyToClipboard(manga_author.text.toString(), R.string.manga_info_author_label) + true + } + manga_cover.setOnClickListener { adapter.coverListener?.zoomImageFromThumb(cover_card) } + if (startExpanded) + expandDesc() } private fun expandDesc() { @@ -68,6 +84,7 @@ class MangaHeaderHolder( } } + @SuppressLint("SetTextI18n") override fun bind(item: ChapterItem, manga: Manga) { val presenter = adapter.coverListener?.mangaPresenter() ?: return manga_full_title.text = manga.currentTitle() @@ -79,11 +96,11 @@ class MangaHeaderHolder( if (manga.currentAuthor() == manga.currentArtist() || manga.currentArtist().isNullOrBlank()) - manga_author.text = manga.currentAuthor() + manga_author.text = manga.currentAuthor()?.trim() else { manga_author.text = "${manga.currentAuthor()?.trim()}, ${manga.currentArtist()}" } - manga_summary.text = manga.currentDesc() ?: itemView.context.getString(R.string + manga_summary.text = manga.currentDesc()?.trim() ?: itemView.context.getString(R.string .no_description) manga_summary.post { @@ -100,6 +117,7 @@ class MangaHeaderHolder( manga.mangaType() == Manga.TYPE_MANHWA -> R.string.manhwa manga.mangaType() == Manga.TYPE_MANHUA -> R.string.manhua manga.mangaType() == Manga.TYPE_COMIC -> R.string.comic + manga.mangaType() == Manga.TYPE_WEBTOON -> R.string.webtoon else -> R.string.manga } ).toLowerCase(Locale.getDefault())) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt index 8dcab4d0b2..0b7b43b242 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt @@ -45,7 +45,8 @@ class ChapterItem(val chapter: Chapter, val manga: Manga) : } override fun createViewHolder(view: View, adapter: FlexibleAdapter>): MangaChapterHolder { - return if (chapter.isHeader) MangaHeaderHolder(view, adapter as ChaptersAdapter) + return if (chapter.isHeader) MangaHeaderHolder(view, adapter as ChaptersAdapter, + startExpanded = chapter.read) else ChapterMatHolder(view, adapter as ChaptersAdapter) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt index 10501eb047..ff7375c5fa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.ui.manga.chapter import android.content.Context import android.view.MenuItem +import android.view.View import androidx.fragment.app.FragmentActivity import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.R @@ -61,11 +62,14 @@ class ChaptersAdapter( fun coverColor(): Int? fun mangaPresenter(): MangaDetailsPresenter fun prepareToShareManga() + fun openInWebView() fun readNextChapter() fun downloadChapter(position: Int) fun topCoverHeight(): Int fun tagClicked(text: String) fun showChapterFilter() fun favoriteManga(longPress: Boolean) + fun copyToClipboard(content: String, label: Int) + fun zoomImageFromThumb(thumbView: View) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt index dc9861234b..40b96f111b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt @@ -14,7 +14,7 @@ class SettingsReaderController : SettingsController() { key = Keys.defaultViewer titleRes = R.string.pref_viewer_type entriesRes = arrayOf(R.string.left_to_right_viewer, R.string.right_to_left_viewer, - R.string.vertical_viewer, R.string.webtoon_viewer) + R.string.vertical_viewer, R.string.webtoon) entryRange = 1..4 defaultValue = 1 } @@ -102,7 +102,7 @@ class SettingsReaderController : SettingsController() { } } preferenceCategory { - titleRes = R.string.webtoon_viewer + titleRes = R.string.webtoon switchPreference { key = Keys.cropBordersWebtoon diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/AutofitRecyclerView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/AutofitRecyclerView.kt index 2e39a3e090..53a8ab4285 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/AutofitRecyclerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/AutofitRecyclerView.kt @@ -11,14 +11,14 @@ class AutofitRecyclerView @JvmOverloads constructor(context: Context, attrs: Att val manager = GridLayoutManager(context, 1) var columnWidth = -1 - /* set(value) { + set(value) { field = value - if (value > 0) { + if (value > 0 && measuredWidth > 0) { val count = max(1, measuredWidth / value) spanCount = count - manager.spanCount = count + //manager.spanCount = count } - }*/ + } var spanCount = 0 diff --git a/app/src/main/res/layout/catalogue_grid_item.xml b/app/src/main/res/layout/catalogue_grid_item.xml index 12eb0bc919..18b8102d0c 100644 --- a/app/src/main/res/layout/catalogue_grid_item.xml +++ b/app/src/main/res/layout/catalogue_grid_item.xml @@ -125,7 +125,7 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" android:orientation="vertical" - android:layout_height="32sp"> + android:layout_height="30sp"> \ No newline at end of file diff --git a/app/src/main/res/layout/manga_details_controller.xml b/app/src/main/res/layout/manga_details_controller.xml index 6c6a5e8de8..494c6071b5 100644 --- a/app/src/main/res/layout/manga_details_controller.xml +++ b/app/src/main/res/layout/manga_details_controller.xml @@ -2,13 +2,13 @@ @@ -25,30 +25,6 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/chapters_title" tools:listitem="@layout/chapters_mat_item"/> - - - - - - + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/manga_header_item.xml b/app/src/main/res/layout/manga_header_item.xml index 4cfe43515e..9e4f434533 100644 --- a/app/src/main/res/layout/manga_header_item.xml +++ b/app/src/main/res/layout/manga_header_item.xml @@ -64,6 +64,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" + android:clickable="true" + android:focusable="true" + android:foreground="?android:attr/selectableItemBackground" android:contentDescription="@string/description_cover" android:maxHeight="300dp" tools:background="@color/material_grey_700" @@ -164,14 +167,29 @@ android:text="@string/manga_tracking_tab" app:icon="@drawable/ic_sync_black_24dp" /> + + + @@ -214,7 +232,7 @@ + + \ No newline at end of file diff --git a/app/src/main/res/menu/main_sort.xml b/app/src/main/res/menu/main_sort.xml index c65b085088..0ad2abde61 100644 --- a/app/src/main/res/menu/main_sort.xml +++ b/app/src/main/res/menu/main_sort.xml @@ -15,7 +15,7 @@ من اليسار لليمين من اليمين لليسار عموديا - ويبتون + ويبتون كيفية ضبط الأبعاد ملائمة الشاشة التمدد diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 6fcda69b2c..67ea14031f 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -120,7 +120,7 @@ От ляво надясно От дясно наляво Вертикално - Уебкомикс + Уебкомикс Увеличение Запълване Разтегляне diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index fc23fb8487..3c77c3f417 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -130,7 +130,7 @@ বাম থেকে ডানে ডান থেকে বামে সোঁজাসুজি - ওয়েবটুন + ওয়েবটুন স্কেল ধরণ সম্পূর্ণ স্ক্রিন ছড়ানো diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index efd3743147..d80bd08a73 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -151,7 +151,7 @@ D\'esquerra a dreta De dreta a esquerra Vertical - Webtoons + Webtoons Paginat Tipus d\'escalat Ajusta a la pantalla diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index dfca286e48..a53088d416 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -242,7 +242,7 @@ Výchozí prohlížeč Výchozí Vertikální - Webtoon + Webtoon Typ úpravy velikosti Přizpůsobit obrazovce Natáhnout diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 3603997b7b..ead87a3c31 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -124,7 +124,7 @@ Links nach rechts Rechts nach links Vertikal - Webtoon + Webtoon Skalierung Bild ausfüllen Strecken diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 8e79494e74..fca036af11 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -152,7 +152,7 @@ Αριστερά προς τα δεξιά Δεξιά προς τα αριστερά Κάθετα - Webtoon + Webtoon Σελιδοποίηση Διάσταση κλίμακας Προσαρμογή στην οθόνη diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 4d88c97796..6294c9e1fa 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -92,7 +92,7 @@ Izquierda a derecha Derecha a izquierda Vertical - Webtoon + Webtoon Tipo de escalado Ajustar a la pantalla Estirado diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index a8fd10b64d..c3016a12d3 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -209,7 +209,7 @@ Vasemmalta oikealle Oikealta vasemmalle Pystysuora - Webtoon-tyylinen + Webtoon-tyylinen Sivut Skaalauksen tyyppi Sovita näyttöön diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 7505635ed3..87194cda54 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -112,7 +112,7 @@ Gauche à droite Droite à gauche Vertical - Webtoon + Webtoon Type de mise à l\'échelle Adapter à l\'écran Étirer diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index a2c1fb1a8c..5084971af2 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -127,7 +127,7 @@ बाएं से दाएं दाएं से बाएं शीर्ष से असंतत - वेबटून + वेबटून मापन प्ररूप उपयुक्त स्क्रीन खींचें diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index fb1319fc48..702aaea24b 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -142,7 +142,7 @@ Balról jobbra Jobbról balra Függőlegesen - Folytonos + Folytonos Képernyőhöz igazítás Forrás váltása Bővítmények diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 427c65f380..536ecbffe8 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -126,7 +126,7 @@ Kiri ke kanan Kanan ke kiri Vertikal - Webtoon + Webtoon Tipe skala Pas layar Rentangkan diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 407117ff0e..5288c50e07 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -111,7 +111,7 @@ Da sinistra a destra Da destra a sinistra Verticale - Webtoon + Webtoon Scala Adatta a schermo Riempi schermo diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index c0fef7dcd8..e5c5677b5f 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -130,7 +130,7 @@ 左から右 右から左 縦反転 - Webtoon + Webtoon ページャ スケールの種類 フィット画面 diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 0e2e26d51f..249a0ae4d9 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -140,7 +140,7 @@ 왼쪽에서 오른쪽으로 오른쪽에서 왼쪽으로 수직으로 - 웹툰 + 웹툰 늘리기 가로 맞추기 세로 맞추기 diff --git a/app/src/main/res/values-ms/strings.xml b/app/src/main/res/values-ms/strings.xml index d25fae2f1a..580a84cb63 100644 --- a/app/src/main/res/values-ms/strings.xml +++ b/app/src/main/res/values-ms/strings.xml @@ -126,7 +126,7 @@ Kiri ke kanan Kanan ke kiri Menegak - Webtoon + Webtoon Skala Muat skrin Regang diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 7433a2687c..d65418ef70 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -147,7 +147,7 @@ Venstre til høyre Høyre til venstre Loddrett - Webtoon + Webtoon Skalatype Tilpass skjerm Strekk diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 81a9b11656..602f31dd26 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -105,7 +105,7 @@ Links naar rechts Rechts naar links Verticaal - Webtoon + Webtoon Uitrekken Aanpassen aan de breedte Aanpassen aan de hoogte diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index c94f5d01cb..f8a147d42c 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -184,7 +184,7 @@ Od lewej do prawej Od prawej do lewej Pionowo - Web-komiks + Web-komiks Domyślny styl czytania Dopasuj do ekranu Rozciągnij diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 6314f856be..5a259434df 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -126,7 +126,7 @@ Esquerda para direita Direita para esquerda Vertical - Vertical contínuo + Vertical contínuo Tipo de escala Ajustar à tela Estender diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 77f3b15a38..5079b8ca6d 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -95,7 +95,7 @@ Esquerda para Direita Direita para Esquerda Vertical - Webtoon + Webtoon Tipo de escala Ajustar ao ecrã Esticar diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 17c6421fa6..0f3d58b776 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -152,7 +152,7 @@ De la stânga la dreapta De la dreapta la stânga Vertical - Benzi desenate web + Benzi desenate web Setări pagini Tip de mărime Potrivire ecran diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 4854aaa80c..b837753723 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -652,7 +652,7 @@ Хочу прочитать - Веб-комикс + Веб-комикс Белый diff --git a/app/src/main/res/values-sc/strings.xml b/app/src/main/res/values-sc/strings.xml index 7dc47e2e18..7af9df7f98 100644 --- a/app/src/main/res/values-sc/strings.xml +++ b/app/src/main/res/values-sc/strings.xml @@ -153,7 +153,7 @@ Dae manca a destra Dae destra a manca Verticale - Webtoon + Webtoon Impaginadore Casta de iscala Adata a s\'ischermu diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 7c48a56822..f0b805eb50 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -166,7 +166,7 @@ Zľava doprava Sprava doľava Vertikálne - Ako Webtoon - Zhora dole a strany sa spájajú do jednej dlhej + Ako Webtoon - Zhora dole a strany sa spájajú do jednej dlhej pager Mód škálovania Prispôsobiť obrazovke diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index f8796b5747..7fedb0be9e 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -153,7 +153,7 @@ S leva na desno S desna na levo Verticalno - "Webtoon " + "Webtoon " Stranično Tip skaliranja Popuni ekran diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index bdd29905cd..d523e9bf6a 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -152,7 +152,7 @@ Vänster till höger Höger till vänster Vertikal - Webbtoon + Webbtoon Sidläsare Skal typ Passa skärmen diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 06ffd35128..a96569fa24 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -155,7 +155,7 @@ จากซ้ายไปขวา จากขวาไปซ้าย แนวตั้ง - เว็บตูน + เว็บตูน การแสดงหน้า ชนิดของมาตราส่วน หน้าจอพอดี diff --git a/app/src/main/res/values-tl/strings.xml b/app/src/main/res/values-tl/strings.xml index b1b40f8b71..d0c602334f 100644 --- a/app/src/main/res/values-tl/strings.xml +++ b/app/src/main/res/values-tl/strings.xml @@ -156,7 +156,7 @@ Kaliwa pakanan Kanan pakaliwa Patayo - Pa-webtoon + Pa-webtoon Pager Uri ng pag-scale Pagkasyahin sa screen diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 922a3c8f95..a6dac9e107 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -151,7 +151,7 @@ Soldan sağa Sağdan sola Dikey - Webtoon + Webtoon Sayfalama Boyutlandırma türü Ekrana sığdır diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index faaf5bb7a9..39e8fdfcf7 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -152,7 +152,7 @@ Зліва направо Справа наліво Вертикальний - Комікс + Комікс Сторінка Масштабування По екрану diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index cbbc410e90..df433ef0a4 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -115,7 +115,7 @@ Trái sang phải Phải sang trái Theo chiều dọc - Chế độ cuộn + Chế độ cuộn Kiểu tỉ lệ Vừa màn hình Kéo dãn diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 1f8bed7926..fa455753d6 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -151,7 +151,7 @@ 从左到右 从右到左 从上到下 - 卷纸模式 + 卷纸模式 页面 显示模式 填充屏幕 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 26f9203e00..3c334d5646 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -222,7 +222,7 @@ 由左至右 由右至左 由上至下 - Webtoon 式 + Webtoon 式 單頁式 縮放模式 符合螢幕 diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index acdf845c2b..da8e6cc755 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -6,7 +6,7 @@ @string/left_to_right_viewer @string/right_to_left_viewer @string/vertical_viewer - @string/webtoon_viewer + @string/webtoon diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2fbdbc652d..510671c57a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -69,6 +69,7 @@ Select all Mark as read Mark all as read + Mark all as unread Mark as unread Mark previous as read Mark multiple @@ -126,7 +127,8 @@ Copy now Reorder Reverse order - Last updated + Last Updated + Latest chapter Hide title Show title Newest @@ -298,7 +300,7 @@ Left to right Right to left Vertical - Webtoon + Webtoon Pager Scale type Fit screen @@ -509,6 +511,7 @@ No description Mark all chapters as read? + Remove from library Start reading