mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-22 10:19:27 +00:00
Reverted platform filters on history page.
This commit is contained in:
parent
879aab0d99
commit
780c1dbde1
2 changed files with 12 additions and 7 deletions
|
@ -74,7 +74,7 @@ class HistoryFragment : MainFragment() {
|
||||||
private var _pager: IPager<HistoryVideo>? = null;
|
private var _pager: IPager<HistoryVideo>? = null;
|
||||||
private val _results = arrayListOf<HistoryVideo>();
|
private val _results = arrayListOf<HistoryVideo>();
|
||||||
private var _loading = false;
|
private var _loading = false;
|
||||||
private val _toggleBar: ToggleBar
|
//private val _toggleBar: ToggleBar
|
||||||
private var _togglePluginsDisabled = hashSetOf<String>()
|
private var _togglePluginsDisabled = hashSetOf<String>()
|
||||||
|
|
||||||
private var _automaticNextPageCounter = 0;
|
private var _automaticNextPageCounter = 0;
|
||||||
|
@ -87,7 +87,7 @@ class HistoryFragment : MainFragment() {
|
||||||
_clearSearch = findViewById(R.id.button_clear_search);
|
_clearSearch = findViewById(R.id.button_clear_search);
|
||||||
_editSearch = findViewById(R.id.edit_search);
|
_editSearch = findViewById(R.id.edit_search);
|
||||||
_tagsView = findViewById(R.id.tags_text);
|
_tagsView = findViewById(R.id.tags_text);
|
||||||
_toggleBar = findViewById(R.id.toggle_bar)
|
//_toggleBar = findViewById(R.id.toggle_bar)
|
||||||
_tagsView.setPairs(listOf(
|
_tagsView.setPairs(listOf(
|
||||||
Pair(context.getString(R.string.last_hour), 60L),
|
Pair(context.getString(R.string.last_hour), 60L),
|
||||||
Pair(context.getString(R.string.last_24_hours), 24L * 60L),
|
Pair(context.getString(R.string.last_24_hours), 24L * 60L),
|
||||||
|
@ -97,7 +97,7 @@ class HistoryFragment : MainFragment() {
|
||||||
Pair(context.getString(R.string.all_time), -1L)
|
Pair(context.getString(R.string.all_time), -1L)
|
||||||
));
|
));
|
||||||
|
|
||||||
val toggles = StatePlatform.instance.getEnabledClients()
|
/*val toggles = StatePlatform.instance.getEnabledClients()
|
||||||
.filter { it is JSClient }
|
.filter { it is JSClient }
|
||||||
.map { plugin ->
|
.map { plugin ->
|
||||||
val pluginName = plugin.name.lowercase()
|
val pluginName = plugin.name.lowercase()
|
||||||
|
@ -111,7 +111,7 @@ class HistoryFragment : MainFragment() {
|
||||||
filtersChanged()
|
filtersChanged()
|
||||||
}).withTag("plugins")
|
}).withTag("plugins")
|
||||||
}.toTypedArray()
|
}.toTypedArray()
|
||||||
_toggleBar.setToggles(*toggles)
|
_toggleBar.setToggles(*toggles)*/
|
||||||
|
|
||||||
_adapter = InsertedViewAdapterWithLoader(context, arrayListOf(), arrayListOf(),
|
_adapter = InsertedViewAdapterWithLoader(context, arrayListOf(), arrayListOf(),
|
||||||
{ _results.size },
|
{ _results.size },
|
||||||
|
@ -277,6 +277,9 @@ class HistoryFragment : MainFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun filterResults(a: List<HistoryVideo>): List<HistoryVideo> {
|
private fun filterResults(a: List<HistoryVideo>): List<HistoryVideo> {
|
||||||
|
return a
|
||||||
|
|
||||||
|
/*
|
||||||
//TODO: Not an ideal way to do this, plugin id would be better but it is null for HistoryVideo ?
|
//TODO: Not an ideal way to do this, plugin id would be better but it is null for HistoryVideo ?
|
||||||
val enabledPluginNames = StatePlatform.instance.getEnabledClients().map { it.name.lowercase() }.toHashSet()
|
val enabledPluginNames = StatePlatform.instance.getEnabledClients().map { it.name.lowercase() }.toHashSet()
|
||||||
val disabledPluginNames = _togglePluginsDisabled.toHashSet()
|
val disabledPluginNames = _togglePluginsDisabled.toHashSet()
|
||||||
|
@ -285,7 +288,7 @@ class HistoryFragment : MainFragment() {
|
||||||
if (!enabledPluginNames.contains(pluginName))
|
if (!enabledPluginNames.contains(pluginName))
|
||||||
return@filter false
|
return@filter false
|
||||||
return@filter !disabledPluginNames.contains(pluginName)
|
return@filter !disabledPluginNames.contains(pluginName)
|
||||||
};
|
};*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadPagerInternal(pager: IPager<HistoryVideo>) {
|
private fun loadPagerInternal(pager: IPager<HistoryVideo>) {
|
||||||
|
|
|
@ -107,12 +107,14 @@
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingTop="15dp"
|
android:paddingTop="15dp"
|
||||||
android:paddingBottom="8dp" />
|
android:paddingBottom="8dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<com.futo.platformplayer.views.ToggleBar
|
<com.futo.platformplayer.views.ToggleBar
|
||||||
android:id="@+id/toggle_bar"
|
android:id="@+id/toggle_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue