Fixes Voted option highlight.

This commit is contained in:
Vitor Pamplona
2023-04-04 13:49:41 -04:00
parent b09bb0c3c5
commit ca2c811859
3 changed files with 5 additions and 1 deletions

View File

@@ -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
}

View File

@@ -10,6 +10,8 @@ interface LnZapEventInterface : EventInterface {
fun zappedAuthor(): List<String>
fun zappedRequestAuthor(): String?
fun taggedAddresses(): List<ATag>
fun amount(): BigDecimal?

View File

@@ -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
}
}