From fc6cfde06395e822dfb8b20c5af33eb05c9a1526 Mon Sep 17 00:00:00 2001 From: Juan Carlos Garrote Date: Mon, 23 Oct 2023 14:55:23 +0200 Subject: [PATCH] Move observer to new method --- .../presentation/files/filelist/MainFileListFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/filelist/MainFileListFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/filelist/MainFileListFragment.kt index a4b68a6eaea..0e41b670f78 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/filelist/MainFileListFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/filelist/MainFileListFragment.kt @@ -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 }