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 23, 2023
1 parent cfd79cb commit fc6cfde
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,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 fc6cfde

Please sign in to comment.