From 035d4ad971f7d9b07591ceed6659f67b6d79f0e7 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Wed, 23 Aug 2023 01:36:32 +0200 Subject: [PATCH] fix: auto download rule state --- .../snapenhance/features/impl/downloader/MediaDownloader.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt b/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt index 6d5d4443..43cc30e9 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt @@ -231,7 +231,7 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp val senderId = conversationMessage.senderId!! val conversationId = conversationMessage.clientConversationId!! - if (!forceDownload && canUseRule(senderId)) { + if (!forceDownload && !canUseRule(senderId)) { return } @@ -281,7 +281,7 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp ) ?: throw Exception("Friend not found in database") val authorName = author.usernameForSorting!! - if (!forceDownload && canUseRule(author.userId!!)) return + if (!forceDownload && !canUseRule(author.userId!!)) return downloadOperaMedia(provideDownloadManagerClient( pathSuffix = authorName,