Skip to content

Commit

Permalink
Show app restore sets sorted by latest first
Browse files Browse the repository at this point in the history
  • Loading branch information
grote committed Apr 29, 2024
1 parent 957d107 commit 47087c2
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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 },
)
}
}

Expand Down

0 comments on commit 47087c2

Please sign in to comment.