mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 16:30:49 +00:00
fix voting on closed polls bug
This commit is contained in:
parent
1f08f33600
commit
7e07573fa5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user