Show app restore sets sorted by latest first
This commit is contained in:
parent
7a10dff51f
commit
6bb05e60e5
1 changed files with 6 additions and 3 deletions
|
@ -44,9 +44,9 @@ class RestoreSetFragment : Fragment() {
|
|||
// decryption will fail when the device is locked, so keep the screen on to prevent locking
|
||||
requireActivity().window.addFlags(FLAG_KEEP_SCREEN_ON)
|
||||
|
||||
viewModel.restoreSetResults.observe(viewLifecycleOwner, { result ->
|
||||
viewModel.restoreSetResults.observe(viewLifecycleOwner) { result ->
|
||||
onRestoreResultsLoaded(result)
|
||||
})
|
||||
}
|
||||
|
||||
skipView.setOnClickListener {
|
||||
viewModel.onFinishClickedAfterRestoringAppData()
|
||||
|
@ -72,7 +72,10 @@ class RestoreSetFragment : Fragment() {
|
|||
listView.visibility = VISIBLE
|
||||
progressBar.visibility = INVISIBLE
|
||||
|
||||
listView.adapter = RestoreSetAdapter(viewModel, results.restorableBackups)
|
||||
listView.adapter = RestoreSetAdapter(
|
||||
listener = viewModel,
|
||||
items = results.restorableBackups.sortedByDescending { it.time },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue