mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix warnings in searchactivity
This commit is contained in:
parent
bc827ec4a4
commit
580f4f4635
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ import uy.kohesive.injekt.api.get
|
|||
|
||||
class SearchActivity : MainActivity() {
|
||||
|
||||
var backToMain = false
|
||||
private var backToMain = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -124,7 +124,7 @@ class SearchActivity : MainActivity() {
|
|||
|
||||
// Get the search query provided in extras, and if not null, perform a global search with it.
|
||||
val query = intent.getStringExtra(SearchManager.QUERY) ?: intent.getStringExtra(Intent.EXTRA_TEXT)
|
||||
if (query != null && query.isNotEmpty()) {
|
||||
if (!query.isNullOrEmpty()) {
|
||||
extensionIntentForText(query)?.let {
|
||||
startActivity(it)
|
||||
finish()
|
||||
|
@ -138,7 +138,7 @@ class SearchActivity : MainActivity() {
|
|||
INTENT_SEARCH -> {
|
||||
val query = intent.getStringExtra(INTENT_SEARCH_QUERY)
|
||||
val filter = intent.getStringExtra(INTENT_SEARCH_FILTER)
|
||||
if (query != null && query.isNotEmpty()) {
|
||||
if (!query.isNullOrEmpty()) {
|
||||
if (router.backstackSize > 1) {
|
||||
router.popToRoot()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue