Skip to content

Commit

Permalink
Merge pull request #58 from emreesen27/develop
Browse files Browse the repository at this point in the history
v1.0.0-beta9 is completed
  • Loading branch information
emreesen27 authored May 31, 2024
2 parents 94fbf6e + c2c565e commit fcd353c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.0.0-beta9 (31.05.2024)
* The issue of the screen not refreshing when a single file is deleted has been resolved
* The sorting feature is hidden while the search is active

## v1.0.0-beta-8 (25.05.2024)
* Sorting feature added for file and media items
* The synchronization issue with the show hidden files setting button has been fixed
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ android {
applicationId "com.sn.snfilemanager"
minSdk 26
targetSdk 34
versionCode 8
versionName "1.0.0-beta8"
versionCode 9
versionName "1.0.0-beta9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ class FilesListFragment :
JobType.DELETE -> {
activity?.runOnUiThread {
data?.filterIsInstance<FileModel>()?.let { adapter?.removeItems(it) }
adapter?.itemCount?.let { count -> if (count == 0) viewModel.setEmptyToFileList() }
}
}

Expand Down Expand Up @@ -507,6 +508,7 @@ class FilesListFragment :
item.setOnActionExpandListener(
object : MenuItem.OnActionExpandListener {
override fun onMenuItemActionExpand(p0: MenuItem): Boolean {
getToolbar().menu.findItem(R.id.sort).isVisible = false
return true
}

Expand All @@ -515,6 +517,8 @@ class FilesListFragment :
actionMode?.finish()
false
} else {
getToolbar().menu.findItem(R.id.sort).isVisible = true
invalidateOptionsMenu()
true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ class FilesListViewModel

fun isSingleItemSelected(): Boolean = selectedItemList.size == 1

fun setEmptyToFileList() {
_updateListLiveData.value = Event(mutableListOf())
}

fun addSelectedItem(
file: FileModel,
selected: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ class MediaFragment :
item.setOnActionExpandListener(
object : MenuItem.OnActionExpandListener {
override fun onMenuItemActionExpand(p0: MenuItem): Boolean {
getToolbar().menu.findItem(R.id.sort).isVisible = false
return true
}

Expand All @@ -364,6 +365,8 @@ class MediaFragment :
actionMode?.finish()
false
} else {
getToolbar().menu.findItem(R.id.sort).isVisible = true
invalidateOptionsMenu()
true
}
}
Expand Down

0 comments on commit fcd353c

Please sign in to comment.