mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +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;
|
||||
|
||||
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)
|
||||
{
|
||||
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;
|
||||
if (cbFilenameFilter.Checked && !string.IsNullOrEmpty(filenameFilter))
|
||||
|
||||
if (!string.IsNullOrEmpty(filenameFilter))
|
||||
{
|
||||
StringComparison rule = GetStringRule();
|
||||
|
||||
|
@ -144,6 +153,7 @@ private HistoryItem[] ApplyFilters(HistoryItem[] historyItems)
|
|||
result = result.Where(x => x.Filename.Equals(filenameFilter, rule));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cbDateFilter.Checked)
|
||||
{
|
||||
|
|
|
@ -73,6 +73,6 @@ Global
|
|||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
RESX_AutoCreateNewLanguageFiles = True
|
||||
RESX_AutoCreateNewLanguageFiles = False
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
Loading…
Reference in a new issue