Commit eb0bae4d authored by Mark Murphy's avatar Mark Murphy

bug fixes

parent ec880f1c
......@@ -84,9 +84,9 @@ abstract class AbstractPermissionActivity : AppCompatActivity() {
}
private fun hasAllPermissions(perms: Array<String>) =
perms.any { hasPermission(it) }
perms.all { hasPermission(it) }
protected fun hasPermission(perm: String) =
private fun hasPermission(perm: String) =
ContextCompat.checkSelfPermission(
this,
perm
......
......@@ -105,12 +105,12 @@ class StorageFragment : Fragment() {
items.addItemDecoration(DividerItemDecoration(activity, manager.orientation))
items.adapter = adapter
motor.states.observe(this) { state ->
motor.states.observe(viewLifecycleOwner) { state ->
adapter.submitList(state.items)
folderItem?.isVisible = state.supportsDirectory
}
topViewModel.refreshEvents.observe(this) { event ->
topViewModel.refreshEvents.observe(viewLifecycleOwner) { event ->
event.handle { motor.refresh() }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment