mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
Resolve lint warnings
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
@@ -120,7 +120,7 @@ class PasswordFragment : Fragment() {
|
|||||||
|
|
||||||
val path = requireNotNull(requireArguments().getString(PasswordStore.REQUEST_ARG_PATH))
|
val path = requireNotNull(requireArguments().getString(PasswordStore.REQUEST_ARG_PATH))
|
||||||
model.navigateTo(File(path), pushPreviousLocation = false)
|
model.navigateTo(File(path), pushPreviousLocation = false)
|
||||||
model.searchResult.observe(this) { result ->
|
model.searchResult.observe(viewLifecycleOwner) { result ->
|
||||||
// Only run animations when the new list is filtered, i.e., the user submitted a search,
|
// Only run animations when the new list is filtered, i.e., the user submitted a search,
|
||||||
// and not on folder navigations since the latter leads to too many removal animations.
|
// and not on folder navigations since the latter leads to too many removal animations.
|
||||||
(recyclerView.itemAnimator as OnOffItemAnimator).isEnabled = result.isFiltered
|
(recyclerView.itemAnimator as OnOffItemAnimator).isEnabled = result.isFiltered
|
||||||
|
@@ -170,6 +170,7 @@ class PasswordStore : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
|
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
||||||
// If request is cancelled, the result arrays are empty.
|
// If request is cancelled, the result arrays are empty.
|
||||||
if (requestCode == REQUEST_EXTERNAL_STORAGE) {
|
if (requestCode == REQUEST_EXTERNAL_STORAGE) {
|
||||||
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
|
@@ -57,7 +57,7 @@ class SelectFolderFragment : Fragment() {
|
|||||||
|
|
||||||
val path = requireNotNull(requireArguments().getString(PasswordStore.REQUEST_ARG_PATH))
|
val path = requireNotNull(requireArguments().getString(PasswordStore.REQUEST_ARG_PATH))
|
||||||
model.navigateTo(File(path), listMode = ListMode.DirectoriesOnly, pushPreviousLocation = false)
|
model.navigateTo(File(path), listMode = ListMode.DirectoriesOnly, pushPreviousLocation = false)
|
||||||
model.searchResult.observe(this) { result ->
|
model.searchResult.observe(viewLifecycleOwner) { result ->
|
||||||
recyclerAdapter.submitList(result.passwordItems)
|
recyclerAdapter.submitList(result.passwordItems)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user