mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-20 21:34:50 +02:00
fix voting on closed polls bug
This commit is contained in:
@@ -131,7 +131,7 @@ fun ZapVote(
|
||||
)
|
||||
.show()
|
||||
}
|
||||
} else if (pollViewModel.isPollClosed) {
|
||||
} else if (pollViewModel.isPollClosed()) {
|
||||
scope.launch {
|
||||
Toast
|
||||
.makeText(
|
||||
|
@@ -30,8 +30,8 @@ class PollNoteViewModel {
|
||||
|
||||
fun isVoteAmountAtomic() = valueMaximum != null && valueMinimum != null && valueMinimum == valueMaximum
|
||||
|
||||
val isPollClosed: Boolean = closedAt?.let { // allow 2 minute leeway for zap to propagate
|
||||
pollNote?.createdAt()?.plus(it * (86400 + 120))!! > Date().time / 1000
|
||||
fun isPollClosed(): Boolean = closedAt?.let { // allow 2 minute leeway for zap to propagate
|
||||
pollNote?.createdAt()?.plus(it * (86400 + 120))!! < Date().time / 1000
|
||||
} == true
|
||||
|
||||
fun voteAmountPlaceHolderText(sats: String): String = if (valueMinimum == null && valueMaximum == null) {
|
||||
|
Reference in New Issue
Block a user