File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
src/main/kotlin/com/simplemobiletools/smsmessenger/activities Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ android {
6363}
6464
6565dependencies {
66- implementation ' com.github.SimpleMobileTools:Simple-Commons:ae8c57858f '
66+ implementation ' com.github.SimpleMobileTools:Simple-Commons:71f9297e2e '
6767 implementation ' org.greenrobot:eventbus:3.3.1'
6868 implementation ' com.github.tibbi:IndicatorFastScroll:4524cd0b61'
6969 implementation ' com.github.tibbi:android-smsmms:33fcaf94d9'
Original file line number Diff line number Diff line change @@ -141,21 +141,25 @@ class MainActivity : SimpleActivity() {
141141 main_menu.getToolbar().inflateMenu(R .menu.menu_main)
142142 main_menu.toggleHideOnScroll(true )
143143 main_menu.setupMenu()
144- main_menu.onSearchOpenListener = {
145- search_holder.fadeIn()
146- conversations_fab.beGone()
147- }
148144
149145 main_menu.onSearchClosedListener = {
150146 search_holder.animate().alpha(0f ).setDuration(SHORT_ANIMATION_DURATION ).withEndAction {
151147 search_holder.beGone()
152148 searchTextChanged(" " , true )
153149 }.start()
154-
155- conversations_fab.beVisible()
156150 }
157151
158152 main_menu.onSearchTextChangedListener = { text ->
153+ if (text.isNotEmpty()) {
154+ if (search_holder.alpha < 1f ) {
155+ search_holder.fadeIn()
156+ }
157+ } else {
158+ search_holder.animate().alpha(0f ).setDuration(SHORT_ANIMATION_DURATION ).withEndAction {
159+ search_holder.beGone()
160+ searchTextChanged(" " , true )
161+ }.start()
162+ }
159163 searchTextChanged(text)
160164 }
161165
You can’t perform that action at this time.
0 commit comments