Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
sblatz committed Mar 29, 2019
1 parent 58c7fc7 commit 4d3f48d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ class AwesomeBarUIView(
}
}

val searchUseCase = object : SearchUseCases.SearchUseCase {
private val searchUseCase = object : SearchUseCases.SearchUseCase {
override fun invoke(searchTerms: String, searchEngine: SearchEngine?) {
actionEmitter.onNext(AwesomeBarAction.SearchTermsTapped(searchTerms, searchEngine))
}
}

val shortcutSearchUseCase = object : SearchUseCases.SearchUseCase {
private val shortcutSearchUseCase = object : SearchUseCases.SearchUseCase {
override fun invoke(searchTerms: String, searchEngine: SearchEngine?) {
actionEmitter.onNext(AwesomeBarAction.SearchTermsTapped(searchTerms, state?.suggestionEngine))
}
Expand Down Expand Up @@ -192,10 +192,7 @@ class AwesomeBarUIView(
}

private fun updateSearchWithVisibility(visible: Boolean) {
search_with_shortcuts.visibility = when (visible) {
true -> View.VISIBLE
false -> View.GONE
}
search_with_shortcuts.visibility = if (visible) View.VISIBLE else View.GONE
}

override fun updateView() = Consumer<AwesomeBarState> {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.appcompat.widget.AppCompatTextView
<TextView
android:id="@+id/search_with_shortcuts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down

0 comments on commit 4d3f48d

Please sign in to comment.