Skip to content

Commit 481604c

Browse files
committed
removed downlload cancellation option for avatar cleanup
1 parent e5f7405 commit 481604c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/src/main/java/org/session/libsession/avatars/AvatarCacheCleaner.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class AvatarCacheCleaner @Inject constructor(
3434
private suspend fun cleanUpAvatars(): Int = withContext(Dispatchers.IO) {
3535
// 1) Build the set of still-wanted Avatars from:
3636
// -> Config
37+
// -> Recipient Settings DB
3738

3839
// config
3940
val avatarsFromConfig: Set<RemoteFile> = recipientAvatarDownloadManager.getAllAvatars()
@@ -60,11 +61,8 @@ class AvatarCacheCleaner @Inject constructor(
6061
deleted
6162
}
6263

63-
fun launchAvatarCleanup(cancelInFlight: Boolean = false) {
64+
fun launchAvatarCleanup() {
6465
coroutineScope.launch(Dispatchers.IO) {
65-
if (cancelInFlight) {
66-
RemoteFileDownloadWorker.cancelAll(application)
67-
}
6866
val deleted = cleanUpAvatars()
6967
Log.d(TAG, "Avatar cache removed: $deleted files")
7068
}

0 commit comments

Comments
 (0)