Skip to content

Commit

Permalink
Move observer to new method
Browse files Browse the repository at this point in the history
  • Loading branch information
JuancaG05 committed Oct 24, 2023
1 parent fb967b1 commit 08ab6a6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,11 @@ class MainFileListFragment : Fragment(),
}

/* TransfersViewModel observables */
// Observe the transfers
observeTransfers()

}

private fun observeTransfers() {
collectLatestLifecycleFlow(transfersViewModel.transfersWithSpaceStateFlow) { transfers ->
val newlySucceededTransfers = transfers.map { it.first }.filter { it.status == TransferStatus.TRANSFER_SUCCEEDED &&
it.accountName == AccountUtils.getCurrentOwnCloudAccount(requireContext()).name }
Expand Down

0 comments on commit 08ab6a6

Please sign in to comment.