-
-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for piefed polls. #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Show poll posts. - Vote on posts. - Create posts.
jwr1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty cool! Do you have any information on when the API will be moved to stable?
That's an interesting limitation, especially if you can add a choice to multi choice polls but not remove one. |
The poll API is part of version 1.4. Looks like they're about halfway through the planned issues https://codeberg.org/rimu/pyfedi/projects/24034. 22 done, 2 doing and 21 todo, but the PieFed folks move fast so not sure what the expected timeline is for that. |
Only submit poll votes on press of submit button. Prevent poll submission when not logged in. Change poll mode to switch.
|
I changed it slightly so that now the user can change their choices until they press submit. Then after submission the radio/check boxes will be disabled so the user can't interact any more. Hopefully this will be less confusing than being able to check choices and not being able to uncheck them. Also results aren't available until the user has submitted. On a guest account the poll should act like it's been submitted already. So the user can't select choices but the results are available. |
# Conflicts: # lib/src/models/post.dart # lib/src/widgets/content_item/content_item.dart
jwr1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! We can go ahead and merge this. I don't think people will have any issue using it with an older PieFed server as long as they don't try to create a poll just yet.
Adds support for piefed polls.
I don't believe the polls API has made it to stable yet so polls only work on crust.piefed.social for now.