Apply system animation scale to parts of Tachiyomi that don't respect it by default (#5794)

* Add initial code for scaling animations, apply scale to reader nav overlay

* Rename extension function, apply system animator scale to ActionToolbar

* Apply system animator scale to expanding manga cover animation

* Apply system animator scale to image crossfade (also disables animated covers when browsing)

* Add documentation, make MotionScene Transition comment a bit more clear

* Disable animated covers in MangaInfoHeaderAdapter if animator duration scale is 0

* Disable animated covers in Library if animator duration scale is 0

* Convert loadAny listener to extension function
This commit is contained in:
Hunter Nickel
2021-08-27 06:44:09 -06:00
committed by GitHub
parent cc3cbbc4bb
commit df683375b1
11 changed files with 84 additions and 8 deletions
@@ -4,11 +4,11 @@ import android.view.View
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import coil.clear
import coil.loadAny
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.IFlexible
import eu.kanade.tachiyomi.databinding.SourceComfortableGridItemBinding
import eu.kanade.tachiyomi.util.isLocal
import eu.kanade.tachiyomi.util.view.loadAnyAutoPause
/**
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
@@ -57,6 +57,6 @@ class LibraryComfortableGridHolder(
// Update the cover.
binding.thumbnail.clear()
binding.thumbnail.loadAny(item.manga)
binding.thumbnail.loadAnyAutoPause(item.manga)
}
}
@@ -3,10 +3,10 @@ package eu.kanade.tachiyomi.ui.library
import android.view.View
import androidx.core.view.isVisible
import coil.clear
import coil.loadAny
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.kanade.tachiyomi.databinding.SourceCompactGridItemBinding
import eu.kanade.tachiyomi.util.isLocal
import eu.kanade.tachiyomi.util.view.loadAnyAutoPause
/**
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
@@ -55,6 +55,6 @@ open class LibraryCompactGridHolder(
// Update the cover.
binding.thumbnail.clear()
binding.thumbnail.loadAny(item.manga)
binding.thumbnail.loadAnyAutoPause(item.manga)
}
}