Add search history preference (#193)
This commit is contained in:
1 parent
91be37fd8a
commit
4c32243e6e
13 files changed
+78
-19
No files matched your search
@@ -0,0 +1,18 @@
|
||||
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
|
||||
Reference in new issue
Block a user