Merge branch 'recloudstream:master' into master

This commit is contained in:
Sdarfeesh 2022-10-15 22:25:32 +08:00 committed by GitHub
commit 79620aaf06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 16 deletions

View file

@ -23,6 +23,7 @@ import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearSnapHelper
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.button.MaterialButton
import com.lagradost.cloudstream3.*
@ -280,6 +281,7 @@ class HomeFragment : Fragment() {
val builder =
BottomSheetDialog(this)
builder.behavior.state = BottomSheetBehavior.STATE_EXPANDED
builder.setContentView(R.layout.home_select_mainpage)
builder.show()
builder.let { dialog ->

View file

@ -17,6 +17,7 @@ import androidx.fragment.app.activityViewModels
import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.button.MaterialButton
import com.lagradost.cloudstream3.*
@ -232,6 +233,7 @@ class SearchFragment : Fragment() {
val builder =
BottomSheetDialog(ctx)
builder.behavior.state = BottomSheetBehavior.STATE_EXPANDED
builder.setContentView(R.layout.home_select_mainpage)
builder.show()
builder.let { dialog ->

View file

@ -232,6 +232,11 @@ class ExtensionsFragment : Fragment() {
val isTv = isTrueTvSettings()
add_repo_button?.isGone = isTv
add_repo_button_imageview_holder?.isVisible = isTv
// Band-aid for Fire TV
plugin_storage_appbar?.isFocusableInTouchMode = isTv
add_repo_button_imageview?.isFocusableInTouchMode = isTv
add_repo_button?.setOnClickListener(addRepositoryClick)
add_repo_button_imageview?.setOnClickListener(addRepositoryClick)

View file

@ -1,27 +1,22 @@
package com.lagradost.cloudstream3.ui.settings.extensions
import android.os.Bundle
import android.view.*
import android.widget.SearchView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.widget.SearchView
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.map
import com.lagradost.cloudstream3.AcraApplication
import com.lagradost.cloudstream3.CommonActivity
import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.mvvm.observe
import com.lagradost.cloudstream3.ui.home.HomeFragment.Companion.getPairList
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.setUpToolbar
import com.lagradost.cloudstream3.ui.settings.appLanguages
import com.lagradost.cloudstream3.ui.settings.getCurrentLocale
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showMultiDialog
import com.lagradost.cloudstream3.utils.SubtitleHelper
import com.lagradost.cloudstream3.utils.UIHelper.toPx
import com.lagradost.cloudstream3.utils.USER_SELECTED_HOMEPAGE_API
import kotlinx.android.synthetic.main.fragment_plugins.*
const val PLUGINS_BUNDLE_NAME = "name"

View file

@ -210,7 +210,7 @@ class PluginsViewModel : ViewModel() {
// Return list to base state if no query
this.sortedBy { it.plugin.second.name }
} else {
this.sortedBy { -FuzzySearch.ratio(it.plugin.second.name, query) }
this.sortedBy { -FuzzySearch.partialRatio(it.plugin.second.name.lowercase(), query.lowercase()) }
}
}

View file

@ -56,6 +56,7 @@
</LinearLayout>
<LinearLayout
android:focusable="true"
android:id="@+id/plugin_storage_appbar"
android:nextFocusRight="@id/add_repo_button_imageview"
android:layout_width="match_parent"
@ -185,6 +186,7 @@
android:background="@drawable/outline_drawable"
android:nextFocusLeft="@id/plugin_storage_appbar"
android:layout_gravity="center"
android:focusable="true"
android:id="@+id/add_repo_button_imageview"
android:layout_width="40dp"

View file

@ -10,7 +10,7 @@
android:id="@+id/listview1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="true"
android:layout_rowWeight="1"
android:layout_marginTop="10dp"
android:layout_marginBottom="60dp"

View file

@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
<menu xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- app:searchHintIcon="@drawable/search_icon"-->
<!-- android:icon="@drawable/search_icon"-->
<item
android:id="@+id/search_button"
android:icon="@drawable/search_icon"
android:title="@string/title_search"
app:actionViewClass="android.widget.SearchView"
app:searchHintIcon="@drawable/search_icon"
app:showAsAction="ifRoom" />
android:icon="@drawable/search_icon"
android:searchIcon="@drawable/search_icon"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView"
tools:ignore="AppCompatResource" />
<item
android:id="@+id/lang_filter"
android:icon="@drawable/ic_baseline_language_24"