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:
Konrad Pozniak 2022-07-26 20:24:50 +02:00 committed by GitHub
commit 1b6a0908f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1219 additions and 308 deletions

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
@ -17,23 +18,40 @@
android:paddingEnd="16dp"
android:paddingBottom="8dp">
<androidx.emoji2.widget.EmojiEditText
android:id="@+id/accountFieldName"
<com.google.android.material.textfield.TextInputLayout
style="@style/TuskyTextInput"
android:id="@+id/accountFieldNameTextLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:hint="@string/profile_metadata_label_label"
android:textColorHint="?android:attr/textColorTertiary"
android:textSize="?attr/status_text_medium" />
app:counterTextColor="?android:textColorTertiary">
<androidx.emoji2.widget.EmojiEditText
android:id="@+id/accountFieldValue"
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/accountFieldNameText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/TuskyTextInput"
android:id="@+id/accountFieldValueTextLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:hint="@string/profile_metadata_content_label"
android:lineSpacingMultiplier="1.1"
android:textColorHint="?android:attr/textColorTertiary"
android:textSize="?attr/status_text_medium" />
app:counterTextColor="?android:textColorTertiary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/accountFieldValueText"
android:lineSpacingMultiplier="1.1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>