Create polls (#1452)

* add AddPollDialog

* add support for pleroma poll options

* add PollPreviewView

* add Poll support to drafts

* add license header, cleanup

* rename drawable files to correct size

* fix tests

* fix bug with Poll having wrong duration after delete&redraft

* add input validation

* grey out poll button when its disabled

* code cleanup & small improvements
This commit is contained in:
Konrad Pozniak 2019-08-22 20:30:08 +02:00 committed by GitHub
commit 51c6852492
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 1540 additions and 76 deletions

View file

@ -29,7 +29,8 @@ data class Instance (
val languages: List<String>,
@SerializedName("contact_account") val contactAccount: Account,
@SerializedName("max_toot_chars") val maxTootChars: Int?,
@SerializedName("max_bio_chars") val maxBioChars: Int?
@SerializedName("max_bio_chars") val maxBioChars: Int?,
@SerializedName("poll_limits") val pollLimits: PollLimits?
) {
override fun hashCode(): Int {
return uri.hashCode()
@ -44,3 +45,7 @@ data class Instance (
}
}
data class PollLimits (
@SerializedName("max_options") val maxOptions: Int?,
@SerializedName("max_option_chars") val maxOptionChars: Int?
)