def onSettingsChanged(self):
     if self.__history__ and not getSetting("history", bool):
         update = (
             (self.__query__.get("action") == "search") and
             (len(self.__query__) > 1)
         )
         clearSearchHistory(update=update)
     self.__setup__()
     containerRefresh()
def clearSearchHistory(type=None, update=False):
    search_history.clear(type=type)
    if type:
        containerRefresh()
    else:
        notify(30114, time=2000)
        if update:
            containerUpdate(__search_url__, "replace")
        else:
            containerRefresh()
Exemple #3
0
 def onSettingsChanged(self):
     self.__setup__()
     containerRefresh()
def updateSortBy(type, query, _sort_by_):
    if ((sort_by := sortBy(sort_by=_sort_by_)) != _sort_by_):
        search_history.record(type, query, sort_by)
        containerRefresh()
def removeSearchQuery(type, query):
    search_history.remove(type, query)
    containerRefresh()