1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2025-07-17 03:16:21 +00:00

Rewritten Settings.

This commit is contained in:
2018-04-10 06:12:02 +02:00
parent e5da546386
commit 5c466131d3
2 changed files with 55 additions and 66 deletions

View File

@@ -352,9 +352,9 @@ class DownloadManager(val client: TelegramClient, val prog: DownloadProgressInte
if (tl_peer_channel == null) continue
var download = true
if (settings.whitelist_channels != null) {
if (settings.whitelist_channels.isNotEmpty()) {
download = settings.whitelist_channels.contains(tl_channel.getId().toString())
} else if (settings.blacklist_channels != null) {
} else if (settings.blacklist_channels.isNotEmpty()) {
download = !settings.blacklist_channels.contains(tl_channel.getId().toString())
}
val channel = Channel(id=tl_channel.getId(), access_hash=tl_channel.getAccessHash(), title=tl_channel.getTitle(), obj=tl_peer_channel, download=download)