19 lines
514 B
Plaintext
19 lines
514 B
Plaintext
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
|
import "pkg:/source/utils/Types.bs"
|
|
|
|
function Init()
|
|
end function
|
|
|
|
function OnNodeReady()
|
|
OnSearchHistoryPreference()
|
|
m.preferences.observeFieldScoped("search_history.enabled", FuncName(OnSearchHistoryPreference))
|
|
end function
|
|
|
|
function OnSearchHistoryPreference() as void
|
|
seachHistoryEnabled = m.preferences["search_history.enabled"]
|
|
if seachHistoryEnabled
|
|
return
|
|
end if
|
|
SearchHistoryUtils.Clear()
|
|
end function
|