mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 14:31:52 +01:00
Random cleanup
This commit is contained in:
parent
edbea486c8
commit
6237a61b4b
@ -38,7 +38,7 @@ class SetTrackChaptersDialog<T> : DialogController
|
|||||||
|
|
||||||
val dialog = MaterialDialog(activity!!)
|
val dialog = MaterialDialog(activity!!)
|
||||||
.title(R.string.chapters)
|
.title(R.string.chapters)
|
||||||
.customView(viewRes = R.layout.track_chapters_dialog, scrollable = false)
|
.customView(viewRes = R.layout.track_chapters_dialog)
|
||||||
.negativeButton(android.R.string.cancel)
|
.negativeButton(android.R.string.cancel)
|
||||||
.positiveButton(android.R.string.ok) { dialog ->
|
.positiveButton(android.R.string.ok) { dialog ->
|
||||||
val view = dialog.getCustomView()
|
val view = dialog.getCustomView()
|
||||||
|
@ -36,7 +36,7 @@ class SetTrackScoreDialog<T> : DialogController where T : SetTrackScoreDialog.Li
|
|||||||
val item = item
|
val item = item
|
||||||
|
|
||||||
val dialog = MaterialDialog(activity!!).title(R.string.score)
|
val dialog = MaterialDialog(activity!!).title(R.string.score)
|
||||||
.customView(R.layout.track_score_dialog, scrollable = false)
|
.customView(R.layout.track_score_dialog)
|
||||||
.negativeButton(android.R.string.cancel).positiveButton(android.R.string.ok) { dialog ->
|
.negativeButton(android.R.string.cancel).positiveButton(android.R.string.ok) { dialog ->
|
||||||
val view = dialog.getCustomView()
|
val view = dialog.getCustomView()
|
||||||
// Remove focus to update selected number
|
// Remove focus to update selected number
|
||||||
|
@ -116,7 +116,7 @@ fun Controller.scrollViewWith(
|
|||||||
) {
|
) {
|
||||||
if (!recycler.canScrollVertically(-1)) {
|
if (!recycler.canScrollVertically(-1)) {
|
||||||
val shortAnimationDuration = resources?.getInteger(
|
val shortAnimationDuration = resources?.getInteger(
|
||||||
android.R.integer.config_shortAnimTime
|
R.integer.config_shortAnimTime
|
||||||
) ?: 0
|
) ?: 0
|
||||||
activity!!.appbar.animate().y(0f).setDuration(shortAnimationDuration.toLong())
|
activity!!.appbar.animate().y(0f).setDuration(shortAnimationDuration.toLong())
|
||||||
.start()
|
.start()
|
||||||
@ -141,7 +141,7 @@ fun Controller.scrollViewWith(
|
|||||||
) {
|
) {
|
||||||
val halfWay = abs((-activity!!.appbar.height.toFloat()) / 2)
|
val halfWay = abs((-activity!!.appbar.height.toFloat()) / 2)
|
||||||
val shortAnimationDuration = resources?.getInteger(
|
val shortAnimationDuration = resources?.getInteger(
|
||||||
android.R.integer.config_shortAnimTime
|
R.integer.config_shortAnimTime
|
||||||
) ?: 0
|
) ?: 0
|
||||||
val closerToTop = abs(activity!!.appbar.y) - halfWay > 0
|
val closerToTop = abs(activity!!.appbar.y) - halfWay > 0
|
||||||
val atTop = (!customPadding &&
|
val atTop = (!customPadding &&
|
||||||
|
Loading…
Reference in New Issue
Block a user