mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-25 16:36:57 +00:00
Fix some issues.
This commit is contained in:
parent
77675b361f
commit
e0de66b1be
@ -436,8 +436,8 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
|||||||
return when (listMode) {
|
return when (listMode) {
|
||||||
getString(R.string.list_view_mode_auto_key) -> {
|
getString(R.string.list_view_mode_auto_key) -> {
|
||||||
val configuration = resources.configuration
|
val configuration = resources.configuration
|
||||||
configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
|
configuration.orientation == Configuration.ORIENTATION_LANDSCAPE &&
|
||||||
&& configuration.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE)
|
configuration.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE)
|
||||||
}
|
}
|
||||||
getString(R.string.list_view_mode_grid_key) -> true
|
getString(R.string.list_view_mode_grid_key) -> true
|
||||||
else -> false
|
else -> false
|
||||||
|
@ -34,12 +34,10 @@ class HeaderWithMenuItem(
|
|||||||
viewBinding.headerTitle.text = title
|
viewBinding.headerTitle.text = title
|
||||||
viewBinding.headerMenuItem.setImageResource(itemIcon)
|
viewBinding.headerMenuItem.setImageResource(itemIcon)
|
||||||
|
|
||||||
val listener: OnClickListener? =
|
val listener = onClickListener?.let { OnClickListener { onClickListener.invoke() } }
|
||||||
onClickListener?.let { OnClickListener { onClickListener.invoke() } }
|
|
||||||
viewBinding.root.setOnClickListener(listener)
|
viewBinding.root.setOnClickListener(listener)
|
||||||
|
|
||||||
val menuItemListener: OnClickListener? =
|
val menuItemListener = menuItemOnClickListener?.let { OnClickListener { menuItemOnClickListener.invoke() } }
|
||||||
menuItemOnClickListener?.let { OnClickListener { menuItemOnClickListener.invoke() } }
|
|
||||||
viewBinding.headerMenuItem.setOnClickListener(menuItemListener)
|
viewBinding.headerMenuItem.setOnClickListener(menuItemListener)
|
||||||
updateMenuItemVisibility(viewBinding)
|
updateMenuItemVisibility(viewBinding)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user