Zooflow: round up the search form

This commit is contained in:
Jonathan Jenne
2022-05-23 16:30:18 +02:00
parent 39c69704f4
commit 92559f4d6e
12 changed files with 180 additions and 196 deletions

View File

@@ -119,6 +119,13 @@ Public Class SearchRunner
End Function
Public Async Function RunWithTokens(pTokens As IEnumerable(Of Search.SearchToken.Token), pDateFrom As Date, pDateTo As Date, pSearchTitle As String) As Task(Of SearchResult)
If pTokens.Count = 0 And
pDateFrom = Date.MinValue And
pDateTo = Date.MinValue And
_ActiveDateConstraint = String.Empty Then
Return New SearchResult(0)
End If
Return Await RunWithSearchTerm(New SearchOptions With {
.SearchTokens = pTokens,
.DateFrom = pDateFrom,
@@ -186,8 +193,6 @@ Public Class SearchRunner
End If
End Function
Private Async Function GetDateConstraint(pDateFrom As Date, pDateTo As Date) As Task(Of String)
Dim oSimpleDateConstraint = $"{_ActiveDateAttribute}~{_ActiveDateConstraint}"
Dim oExplicitConstraint = Await MaybeSetExplicitDateConstraint(pDateFrom, pDateTo)