mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
fixed #713: History host filter error
This commit is contained in:
parent
27f42f153f
commit
44e391d333
2 changed files with 30 additions and 20 deletions
|
@ -112,18 +112,27 @@ private HistoryItem[] ApplyFilters(HistoryItem[] historyItems)
|
||||||
{
|
{
|
||||||
string type = cbTypeFilterSelection.Text;
|
string type = cbTypeFilterSelection.Text;
|
||||||
|
|
||||||
result = result.Where(x => x.Type == type);
|
if (!string.IsNullOrEmpty(type))
|
||||||
|
{
|
||||||
|
result = result.Where(x => !string.IsNullOrEmpty(x.Type) && x.Type == type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cbHostFilter.Checked)
|
if (cbHostFilter.Checked)
|
||||||
{
|
{
|
||||||
string host = txtHostFilter.Text;
|
string host = txtHostFilter.Text;
|
||||||
|
|
||||||
result = result.Where(x => x.Host.IndexOf(host, StringComparison.InvariantCultureIgnoreCase) >= 0);
|
if (!string.IsNullOrEmpty(host))
|
||||||
|
{
|
||||||
|
result = result.Where(x => !string.IsNullOrEmpty(x.Host) && x.Host.IndexOf(host, StringComparison.InvariantCultureIgnoreCase) >= 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cbFilenameFilter.Checked)
|
||||||
|
{
|
||||||
string filenameFilter = txtFilenameFilter.Text;
|
string filenameFilter = txtFilenameFilter.Text;
|
||||||
if (cbFilenameFilter.Checked && !string.IsNullOrEmpty(filenameFilter))
|
|
||||||
|
if (!string.IsNullOrEmpty(filenameFilter))
|
||||||
{
|
{
|
||||||
StringComparison rule = GetStringRule();
|
StringComparison rule = GetStringRule();
|
||||||
|
|
||||||
|
@ -144,6 +153,7 @@ private HistoryItem[] ApplyFilters(HistoryItem[] historyItems)
|
||||||
result = result.Where(x => x.Filename.Equals(filenameFilter, rule));
|
result = result.Where(x => x.Filename.Equals(filenameFilter, rule));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cbDateFilter.Checked)
|
if (cbDateFilter.Checked)
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,6 +73,6 @@ Global
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
RESX_AutoCreateNewLanguageFiles = True
|
RESX_AutoCreateNewLanguageFiles = False
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
Loading…
Reference in a new issue