Prevent keyboard to pop over result pages.
This commit is contained in:
parent
b9e9272336
commit
e4da4af3f3
|
@ -12,7 +12,6 @@ import com.github.apognu.otter.fragments.ArtistsFragment
|
|||
import com.github.apognu.otter.repositories.*
|
||||
import com.github.apognu.otter.utils.Album
|
||||
import com.github.apognu.otter.utils.Artist
|
||||
import com.github.apognu.otter.utils.log
|
||||
import com.github.apognu.otter.utils.untilNetwork
|
||||
import kotlinx.android.synthetic.main.activity_search.*
|
||||
import java.net.URLEncoder
|
||||
|
@ -38,6 +37,8 @@ class SearchActivity : AppCompatActivity() {
|
|||
results.layoutManager = LinearLayoutManager(this)
|
||||
results.adapter = it
|
||||
}
|
||||
|
||||
search.requestFocus()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -48,8 +49,6 @@ class SearchActivity : AppCompatActivity() {
|
|||
tracksRepository = TracksSearchRepository(this@SearchActivity, "")
|
||||
favoritesRepository = FavoritesRepository(this@SearchActivity)
|
||||
|
||||
search.requestFocus()
|
||||
|
||||
search.setOnQueryTextListener(object : androidx.appcompat.widget.SearchView.OnQueryTextListener {
|
||||
override fun onQueryTextSubmit(rawQuery: String?): Boolean {
|
||||
search.clearFocus()
|
||||
|
|
|
@ -150,10 +150,7 @@ class TracksFragment : OtterFragment<Track, TracksAdapter>() {
|
|||
lifecycleScope.launch(Main) {
|
||||
CommandBus.get().collect { command ->
|
||||
when (command) {
|
||||
is Command.RefreshTrack -> {
|
||||
log("${command.track?.title} -> ${command.track?.favorite}")
|
||||
refreshCurrentTrack(command.track)
|
||||
}
|
||||
is Command.RefreshTrack -> refreshCurrentTrack(command.track)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue