File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
src/main/kotlin/com/simplemobiletools/filemanager/pro/activities Expand file tree Collapse file tree 3 files changed +12
-6
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:4d36cc84e9 '
66+ implementation ' com.github.SimpleMobileTools:Simple-Commons:f84b3a7e61 '
6767 implementation ' com.github.Stericson:RootTools:df729dcb13'
6868 implementation ' com.github.Stericson:RootShell:1.6'
6969 implementation ' com.alexvasilkov:gesture-views:2.5.2'
Original file line number Diff line number Diff line change @@ -411,10 +411,7 @@ class MainActivity : SimpleActivity() {
411411
412412 main_view_pager.addOnPageChangeListener(object : ViewPager .OnPageChangeListener {
413413 override fun onPageScrollStateChanged (state : Int ) {
414- if (isSearchOpen) {
415- (getCurrentFragment() as ? ItemOperationsListener )?.searchQueryChanged(" " )
416- searchMenuItem?.collapseActionView()
417- }
414+ closeSearchIfOpen()
418415 }
419416
420417 override fun onPageScrolled (position : Int , positionOffset : Float , positionOffsetPixels : Int ) {}
@@ -493,6 +490,13 @@ class MainActivity : SimpleActivity() {
493490 }
494491 }
495492
493+ private fun closeSearchIfOpen () {
494+ if (isSearchOpen) {
495+ (getCurrentFragment() as ? ItemOperationsListener )?.searchQueryChanged(" " )
496+ searchMenuItem?.collapseActionView()
497+ }
498+ }
499+
496500 private fun openPath (path : String , forceRefresh : Boolean = false) {
497501 if (mIsPasswordProtectionPending && ! mWasProtectionHandled) {
498502 return
@@ -599,11 +603,13 @@ class MainActivity : SimpleActivity() {
599603 }
600604
601605 private fun launchSettings () {
606+ closeSearchIfOpen()
602607 hideKeyboard()
603608 startActivity(Intent (applicationContext, SettingsActivity ::class .java))
604609 }
605610
606611 private fun launchAbout () {
612+ closeSearchIfOpen()
607613 val licenses = LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GESTURE_VIEWS
608614
609615 val faqItems = arrayListOf (
Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
33buildscript {
4- ext. kotlin_version = ' 1.6.0 '
4+ ext. kotlin_version = ' 1.6.10 '
55
66 repositories {
77 google()
You can’t perform that action at this time.
0 commit comments