mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-20 19:30:26 +12:00
Removed an unused function that I'd added, added some comments
This commit is contained in:
parent
d2d318471d
commit
7a99408e36
|
@ -522,6 +522,7 @@ namespace VRCMelonAssistant.Pages
|
||||||
{
|
{
|
||||||
ModsListView.Items.Filter = ModsListView.Items.Filter;
|
ModsListView.Items.Filter = ModsListView.Items.Filter;
|
||||||
}
|
}
|
||||||
|
// Only null this if both filters (search and installed) are off
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ModsListView.Items.Filter = null;
|
ModsListView.Items.Filter = null;
|
||||||
|
@ -545,7 +546,9 @@ namespace VRCMelonAssistant.Pages
|
||||||
private bool SearchFilter(object mod)
|
private bool SearchFilter(object mod)
|
||||||
{
|
{
|
||||||
ModListItem item = mod as ModListItem;
|
ModListItem item = mod as ModListItem;
|
||||||
|
// If the installed filter is on, don't search the text of mods that aren't installed
|
||||||
if (FilteredToInstalled && !item.IsInstalled) return false;
|
if (FilteredToInstalled && !item.IsInstalled) return false;
|
||||||
|
// SearchBar.Height does not adjust fast enough to be used here, FilteredBySearch is changed at the same time
|
||||||
if (FilteredBySearch)
|
if (FilteredBySearch)
|
||||||
{
|
{
|
||||||
if (item.ModName.ToLower().Contains(SearchBar.Text.ToLower())) return true;
|
if (item.ModName.ToLower().Contains(SearchBar.Text.ToLower())) return true;
|
||||||
|
@ -569,13 +572,6 @@ namespace VRCMelonAssistant.Pages
|
||||||
ModsListView.Items.Filter = new Predicate<object>(SearchFilter);
|
ModsListView.Items.Filter = new Predicate<object>(SearchFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool InstalledFilter(object mod)
|
|
||||||
{
|
|
||||||
ModListItem item = mod as ModListItem;
|
|
||||||
if (item.IsInstalled) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Animate(TextBlock target, double oldHeight, double newHeight, TimeSpan duration)
|
private void Animate(TextBlock target, double oldHeight, double newHeight, TimeSpan duration)
|
||||||
{
|
{
|
||||||
target.Height = oldHeight;
|
target.Height = oldHeight;
|
||||||
|
|
Loading…
Reference in a new issue