mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Fixed minor bugs and improved Chip UI
This commit is contained in:
parent
18eebe663b
commit
8119462cb7
@ -216,7 +216,7 @@ class ChannelFragment : BaseFragment() {
|
|||||||
chip.visibility = View.VISIBLE
|
chip.visibility = View.VISIBLE
|
||||||
chip.setOnClickListener {
|
chip.setOnClickListener {
|
||||||
binding.tabChips.children.forEach {
|
binding.tabChips.children.forEach {
|
||||||
if (it != chip) it.isSelected = false
|
if (it != chip) (it as Chip).isChecked = false
|
||||||
}
|
}
|
||||||
scope.launch {
|
scope.launch {
|
||||||
val response = try {
|
val response = try {
|
||||||
@ -243,7 +243,11 @@ class ChannelFragment : BaseFragment() {
|
|||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
newContent?.content?.let { adapter.updateItems(it) }
|
runOnUiThread {
|
||||||
|
newContent?.content?.let {
|
||||||
|
adapter.updateItems(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,19 +116,20 @@
|
|||||||
android:padding="10dp" />
|
android:padding="10dp" />
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:id="@+id/tab_chips"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingHorizontal="10dp"
|
android:paddingHorizontal="10dp"
|
||||||
android:scrollbars="none">
|
android:scrollbars="none">
|
||||||
|
|
||||||
<com.google.android.material.chip.ChipGroup
|
<com.google.android.material.chip.ChipGroup
|
||||||
|
android:id="@+id/tab_chips"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
android:id="@+id/videos"
|
android:id="@+id/videos"
|
||||||
style="@style/channelChip"
|
style="@style/channelChip"
|
||||||
|
android:checked="true"
|
||||||
android:text="@string/videos"
|
android:text="@string/videos"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user