Resolve lint warnings
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
5d884a8a74
commit
934c256edd
3 changed files with 3 additions and 2 deletions
|
@ -120,7 +120,7 @@ class PasswordFragment : Fragment() {
|
|||
|
||||
val path = requireNotNull(requireArguments().getString(PasswordStore.REQUEST_ARG_PATH))
|
||||
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,
|
||||
// and not on folder navigations since the latter leads to too many removal animations.
|
||||
(recyclerView.itemAnimator as OnOffItemAnimator).isEnabled = result.isFiltered
|
||||
|
|
|
@ -170,6 +170,7 @@ class PasswordStore : AppCompatActivity() {
|
|||
}
|
||||
|
||||
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 (requestCode == REQUEST_EXTERNAL_STORAGE) {
|
||||
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
|
|
|
@ -57,7 +57,7 @@ class SelectFolderFragment : Fragment() {
|
|||
|
||||
val path = requireNotNull(requireArguments().getString(PasswordStore.REQUEST_ARG_PATH))
|
||||
model.navigateTo(File(path), listMode = ListMode.DirectoriesOnly, pushPreviousLocation = false)
|
||||
model.searchResult.observe(this) { result ->
|
||||
model.searchResult.observe(viewLifecycleOwner) { result ->
|
||||
recyclerAdapter.submitList(result.passwordItems)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue