mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 07:37:12 +01:00
Simplifies the drawing of gallery entires without e tags.
This commit is contained in:
@@ -58,9 +58,9 @@ class ProfileGalleryEntryEvent(
|
||||
|
||||
fun hasUrl() = tags.any { it.size > 1 && it[0] == URL }
|
||||
|
||||
fun event() = tags.firstOrNull { it.size > 1 && it[0] == "e" }?.get(1)
|
||||
fun fromEvent() = tags.firstOrNull { it.size > 1 && it[0] == "e" }?.get(1)
|
||||
|
||||
fun hasEvent() = tags.any { it.size > 1 && it[0] == "e" }
|
||||
fun hasFromEvent() = tags.any { it.size > 1 && it[0] == "e" }
|
||||
|
||||
fun isOneOf(mimeTypes: Set<String>) = tags.any { it.size > 1 && it[0] == MIME_TYPE && mimeTypes.contains(it[1]) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user