From 9832d429b0af86ebaed5be83a871c3e8a9ea3776 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Mon, 11 Dec 2017 08:41:59 +0100 Subject: [PATCH] More Kotlinification. --- .../mediafilemanager/DocumentFileManager.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/DocumentFileManager.kt b/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/DocumentFileManager.kt index 9dd9ca7..3b7dabc 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/DocumentFileManager.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/DocumentFileManager.kt @@ -50,13 +50,7 @@ class DocumentFileManager(msg: TLMessage, user: UserManager, client: TelegramCli get() { var sticker: TLDocumentAttributeSticker? = null if (this.isEmpty || doc == null) return false - if (doc!!.getAttributes() != null) - for (attr in doc!!.getAttributes()) { - if (attr is TLDocumentAttributeSticker) { - sticker = attr as TLDocumentAttributeSticker - } - } - return sticker != null + return doc!!.getAttributes()?.filter{it is TLDocumentAttributeSticker}.isNotEmpty() } val size: Int