File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
owncloudApp/src/main/java/com/owncloud/android/workers Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 33 *
44 * @author Abel García de Prada
55 * @author Juan Carlos Garrote Gascón
6+ * @author Jorge Aguado Recio
67 *
7- * Copyright (C) 2022 ownCloud GmbH.
8+ * Copyright (C) 2025 ownCloud GmbH.
89 * <p>
910 * This program is free software: you can redistribute it and/or modify
1011 * it under the terms of the GNU General Public License version 2,
@@ -246,10 +247,13 @@ class AutomaticUploadsWorker(
246247 val arrayOfLocalFiles = documentTree?.listFiles() ? : arrayOf()
247248
248249 val filteredList: List <DocumentFile > = arrayOfLocalFiles
250+ .asSequence()
251+ .filter {
252+ it.lastModified() in lastSyncTimestamp.. < currentTimestamp &&
253+ MimetypeIconUtil .getBestMimeTypeByFilename(it.name).startsWith(syncType.prefixForType)
254+ }
249255 .sortedBy { it.lastModified() }
250- .filter { it.lastModified() >= lastSyncTimestamp }
251- .filter { it.lastModified() < currentTimestamp }
252- .filter { MimetypeIconUtil .getBestMimeTypeByFilename(it.name).startsWith(syncType.prefixForType) }
256+ .toList()
253257
254258 Timber .i(" Last sync ${syncType.name} : ${Date (lastSyncTimestamp)} " )
255259 Timber .i(" CurrentTimestamp ${Date (currentTimestamp)} " )
You can’t perform that action at this time.
0 commit comments