mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30: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.setOnClickListener {
|
||||
binding.tabChips.children.forEach {
|
||||
if (it != chip) it.isSelected = false
|
||||
if (it != chip) (it as Chip).isChecked = false
|
||||
}
|
||||
scope.launch {
|
||||
val response = try {
|
||||
@ -243,7 +243,11 @@ class ChannelFragment : BaseFragment() {
|
||||
e.printStackTrace()
|
||||
null
|
||||
}
|
||||
newContent?.content?.let { adapter.updateItems(it) }
|
||||
runOnUiThread {
|
||||
newContent?.content?.let {
|
||||
adapter.updateItems(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,19 +116,20 @@
|
||||
android:padding="10dp" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/tab_chips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/tab_chips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/videos"
|
||||
style="@style/channelChip"
|
||||
android:checked="true"
|
||||
android:text="@string/videos"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user