mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-19 21:31:17 +02:00
Fixes Voted option highlight.
This commit is contained in:
@@ -27,6 +27,8 @@ class LnZapEvent(
|
||||
.filter { it.firstOrNull() == "p" }
|
||||
.mapNotNull { it.getOrNull(1) }
|
||||
|
||||
override fun zappedRequestAuthor(): String? = containedPost()?.pubKey()
|
||||
|
||||
override fun amount(): BigDecimal? {
|
||||
return amount
|
||||
}
|
||||
|
@@ -10,6 +10,8 @@ interface LnZapEventInterface : EventInterface {
|
||||
|
||||
fun zappedAuthor(): List<String>
|
||||
|
||||
fun zappedRequestAuthor(): String?
|
||||
|
||||
fun taggedAddresses(): List<ATag>
|
||||
|
||||
fun amount(): BigDecimal?
|
||||
|
@@ -94,7 +94,7 @@ class PollNoteViewModel {
|
||||
.filterIsInstance<LnZapEvent>()
|
||||
.map {
|
||||
val zappedOption = it.zappedPollOption()
|
||||
if (zappedOption == option) {
|
||||
if (zappedOption == option && it.zappedRequestAuthor() == user.pubkeyHex ) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user