mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Fix crash on Emulator and TV
This commit is contained in:
parent
c9567c9694
commit
145482a32f
3 changed files with 221 additions and 236 deletions
|
@ -112,6 +112,7 @@ class DownloadChildFragment : Fragment() {
|
|||
if (!isMultiDeleteState) {
|
||||
detachBackPressedCallback()
|
||||
downloadsViewModel.clearSelectedItems()
|
||||
binding?.downloadChildToolbar?.isVisible = true
|
||||
}
|
||||
}
|
||||
observe(downloadsViewModel.selectedBytes) {
|
||||
|
@ -161,6 +162,7 @@ class DownloadChildFragment : Fragment() {
|
|||
private fun handleSelectedChange(selected: MutableList<VisualDownloadCached>) {
|
||||
if (selected.isNotEmpty()) {
|
||||
binding?.downloadDeleteAppbar?.isVisible = true
|
||||
binding?.downloadChildToolbar?.isVisible = false
|
||||
activity?.attachBackPressedCallback {
|
||||
downloadsViewModel.setIsMultiDeleteState(false)
|
||||
}
|
||||
|
|
|
@ -7,17 +7,13 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryGrayBackground"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.download.DownloadFragment">
|
||||
tools:context=".ui.download.DownloadChildFragment">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/download_delete_appbar"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -25,8 +21,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
android:elevation="100dp">
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnCancel"
|
||||
|
@ -83,10 +78,6 @@
|
|||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/download_child_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -97,8 +88,6 @@
|
|||
app:navigationIconTint="?attr/iconColor"
|
||||
app:titleTextColor="?attr/textColor"
|
||||
tools:title="Overlord" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
|
|
@ -17,11 +17,6 @@
|
|||
For Scroll add to LinearLayout
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/download_delete_appbar"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -195,7 +190,6 @@
|
|||
tools:text="Free • 30.58GB" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue