Skip to content

Commit 91e569c

Browse files
authored
Merge pull request #4553 from CodeObsessed-1234/fix/incorrect-folder-size-move-4505
[FIX] Ensure folder size updates automatically after file replacement
2 parents e6e36ee + 1ddf20f commit 91e569c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

changelog/unreleased/4553

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugfix: Ensure folder size updates automatically after file replacement
2+
3+
The folder size has been updated automatically after replacing a file during a move operation,
4+
eliminating the need for a manual refresh.
5+
6+
https://github.com/owncloud/android/issues/4505
7+
https://github.com/owncloud/android/pull/4553

owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,15 @@ class FileDisplayActivity : FileActivity(),
10531053

10541054
is UIResult.Success -> {
10551055
dismissLoadingDialog()
1056+
// auto refresh
1057+
file?.let {
1058+
fileOperationsViewModel.performOperation(
1059+
FileOperation.RefreshFolderOperation(
1060+
folderToRefresh = it,
1061+
shouldSyncContents = false // Ensure metadata is updated on callBack
1062+
)
1063+
)
1064+
}
10561065
val replace = mutableListOf<Boolean?>()
10571066
uiResult.data?.let {
10581067
showConflictDecisionDialog(uiResult = uiResult, data = it, replace = replace) { data, replace ->
@@ -1092,6 +1101,15 @@ class FileDisplayActivity : FileActivity(),
10921101

10931102
is UIResult.Success -> {
10941103
dismissLoadingDialog()
1104+
// auto refresh
1105+
file?.let {
1106+
fileOperationsViewModel.performOperation(
1107+
FileOperation.RefreshFolderOperation(
1108+
folderToRefresh = it,
1109+
shouldSyncContents = false // Ensure metadata is updated on callBack
1110+
)
1111+
)
1112+
}
10951113
val replace = mutableListOf<Boolean?>()
10961114
uiResult.data?.let {
10971115
showConflictDecisionDialog(uiResult = uiResult, data = it, replace = replace) { data, replace ->

0 commit comments

Comments
 (0)