Handle even more instance defaults (#2612)
* handle media size instance limits * remove unused attributes from Instance entity * support max_media_attachments * support pleroma field limits, remove max_bio_chars support * improve field input margin * fix tests * MAX_ACCOUNT_FIELDS -> DEFAULT_MAX_ACCOUNT_FIELDS * improve "add field" button behavior * fix copy paste mistake in AccountFieldEditAdapter * refactor sendStatus to be a suspending function
This commit is contained in:
parent
25f637f0a8
commit
1b6a0908f6
16 changed files with 1219 additions and 308 deletions
|
|
@ -19,19 +19,20 @@ import com.google.gson.annotations.SerializedName
|
|||
|
||||
data class Instance(
|
||||
val uri: String,
|
||||
val title: String,
|
||||
val description: String,
|
||||
val email: String,
|
||||
// val title: String,
|
||||
// val description: String,
|
||||
// val email: String,
|
||||
val version: String,
|
||||
val urls: Map<String, String>,
|
||||
val stats: Map<String, Int>?,
|
||||
val thumbnail: String?,
|
||||
val languages: List<String>,
|
||||
@SerializedName("contact_account") val contactAccount: Account,
|
||||
// val urls: Map<String, String>,
|
||||
// val stats: Map<String, Int>?,
|
||||
// val thumbnail: String?,
|
||||
// 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("poll_limits") val pollConfiguration: PollConfiguration?,
|
||||
val configuration: InstanceConfiguration?,
|
||||
@SerializedName("max_media_attachments") val maxMediaAttachments: Int?,
|
||||
val pleroma: PleromaConfiguration?
|
||||
) {
|
||||
override fun hashCode(): Int {
|
||||
return uri.hashCode()
|
||||
|
|
@ -74,3 +75,17 @@ data class MediaAttachmentConfiguration(
|
|||
@SerializedName("video_frame_rate_limit") val videoFrameRateLimit: Int?,
|
||||
@SerializedName("video_matrix_limit") val videoMatrixLimit: Int?,
|
||||
)
|
||||
|
||||
data class PleromaConfiguration(
|
||||
val metadata: PleromaMetadata?
|
||||
)
|
||||
|
||||
data class PleromaMetadata(
|
||||
@SerializedName("fields_limits") val fieldLimits: PleromaFieldLimits
|
||||
)
|
||||
|
||||
data class PleromaFieldLimits(
|
||||
@SerializedName("max_fields") val maxFields: Int?,
|
||||
@SerializedName("name_length") val nameLength: Int?,
|
||||
@SerializedName("value_length") val valueLength: Int?
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue