Skip to content

Commit

Permalink
♻️ search engine 提高优先级
Browse files Browse the repository at this point in the history
  • Loading branch information
jackie-yellow committed May 15, 2024
1 parent 0fb3da8 commit ec55ed9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,10 @@ class BrowserViewModel(
return@launch
}
// 尝试
val webUrl = url.toWebUrlOrWithoutProtocol()
?: checkAndEnableSearchEngine(url) // 检查是否有默认的搜索引擎
val webUrl = checkAndEnableSearchEngine(url) // 检查是否有默认的搜索引擎
?: url.toWebUrlOrWithoutProtocol()
?: filterShowEngines.firstOrNull()?.searchLinks?.first()?.format(url)?.toWebUrl() // 转换成搜索链接
debugBrowser("doSearchUI", "url=$url, webUrl=$webUrl, focusedPage=$focusedPage")
debugBrowser("doIOSearchUrl", "url=$url, webUrl=$webUrl, focusedPage=$focusedPage")
// 当没有搜到需要的数据,给出提示
if (webUrl == null) {
showToastMessage(BrowserI18nResource.Home.search_error.text)
Expand Down

0 comments on commit ec55ed9

Please sign in to comment.