fix typo
This commit is contained in:
parent
4cebd52545
commit
192cc0ddb2
3 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ It is intended to be used together with [µLauncher](https://github.com/jrpie/La
|
||||||
but any app using `Intent.ACTION_SEARCH_WEB` works.
|
but any app using `Intent.ACTION_SEARCH_WEB` works.
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
* Type "sp test" in the search bar, and launch search.
|
* Type "sp test" in the search bar and launch search.
|
||||||
* Select µSearch as search engine.
|
* Select µSearch as search engine.
|
||||||
* µSearch launches and detects the prefix sp for StartPage
|
* µSearch launches and detects the prefix sp for StartPage
|
||||||
* µSearch opens the url `https://startpage.com/sp/search?query=test`
|
* µSearch opens the url `https://startpage.com/sp/search?query=test`
|
||||||
|
|
|
@ -12,7 +12,7 @@ android {
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0"
|
versionName = "0.0.1"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ class SearchActivity : AppCompatActivity() {
|
||||||
val query = intent.getCharSequenceExtra(SearchManager.QUERY).toString()
|
val query = intent.getCharSequenceExtra(SearchManager.QUERY).toString()
|
||||||
|
|
||||||
val prefix = query.split(" ")[0].lowercase()
|
val prefix = query.split(" ")[0].lowercase()
|
||||||
Log.e("µSearch", "prefix=\"$prefix\"")
|
Log.i("µSearch", "prefix=\"$prefix\"")
|
||||||
engines[prefix]?.let {
|
engines[prefix]?.let {
|
||||||
search(it, query.replace("^${prefix} ".toRegex(), ""))
|
search(it, query.replace("^${prefix} ".toRegex(), ""))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue