diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/PollNote.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/PollNote.kt
index d4206c482..e46645a34 100644
--- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/PollNote.kt
+++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/PollNote.kt
@@ -71,7 +71,7 @@ fun PollNote(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(vertical = 3.dp)
) {
- if (zappedNote.author == account.userProfile() || zappedNote.isZappedBy(account.userProfile()) == true) {
+ if (zappedNote.author == account.userProfile() || zappedNote.isZappedBy(account.userProfile())) {
ZapVote(
baseNote,
accountViewModel,
@@ -209,6 +209,16 @@ fun ZapVote(
)
.show()
}
+ } else if (zappedNote?.author == account.userProfile()) {
+ scope.launch {
+ Toast
+ .makeText(
+ context,
+ context.getString(R.string.poll_author_no_vote),
+ Toast.LENGTH_SHORT
+ )
+ .show()
+ }
} else if (pollViewModel.isVoteAmountAtomic() && pollViewModel.isPollOptionZappedBy(pollOption, accountViewModel.userProfile())) {
// only allow one vote per option when min==max, i.e. atomic vote amount specified
scope.launch {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6e8947047..60375a15a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -290,4 +290,5 @@
Thank you for all your work!
Create and Add
+ Poll authors can\'t vote in their own polls.