mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-01 06:47:56 +01:00
Revert history Compose/SQLDelight changes
This commit is contained in:
@@ -5,10 +5,8 @@ import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.coordinatorlayout.R
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.doOnLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.customview.view.AbsSavedState
|
||||
@@ -65,16 +63,7 @@ class TachiyomiCoordinatorLayout @JvmOverloads constructor(
|
||||
super.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type, consumed)
|
||||
// Disable elevation overlay when tabs are visible
|
||||
if (canLiftAppBarOnScroll) {
|
||||
if (target is ComposeView) {
|
||||
val scrollCondition = if (type == ViewCompat.TYPE_NON_TOUCH) {
|
||||
dyUnconsumed >= 0
|
||||
} else {
|
||||
dyConsumed != 0 || dyUnconsumed >= 0
|
||||
}
|
||||
appBarLayout?.isLifted = scrollCondition && tabLayout?.isVisible == false
|
||||
} else {
|
||||
appBarLayout?.isLifted = (dyConsumed != 0 || dyUnconsumed >= 0) && tabLayout?.isVisible == false
|
||||
}
|
||||
appBarLayout?.isLifted = (dyConsumed != 0 || dyUnconsumed >= 0) && tabLayout?.isVisible == false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) :
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ThemeViewHolder {
|
||||
val themeResIds = ThemingDelegate.getThemeResIds(themes[viewType], preferences.themeDarkAmoled().get())
|
||||
val themedContext = themeResIds.fold(parent.context) {
|
||||
context, themeResId ->
|
||||
context, themeResId ->
|
||||
ContextThemeWrapper(context, themeResId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user