add possibility to change profile fields, refactor (#751)

* refactor EditProfileActivity, add profile fields

* preserve transparency when cropping profile images

* dont validate profile fields on client side

* revert unintentional change in card_frame_dark.xml

* improve activity_edit_profile layout for tablets

* Revert "improve activity_edit_profile layout for tablets"

This reverts commit 20ff3d167c39b15566e017108b33fe58690a8482.

* improve activity_edit_profile layout for tablets

* fix bug in EditProfileActivity, add snackbar

* improve EditProfileActivity code

* use events instead of shared prefs to communicate profile update
This commit is contained in:
Konrad Pozniak 2018-08-15 20:47:09 +02:00 committed by GitHub
commit f022944e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 727 additions and 395 deletions

View file

@ -166,13 +166,22 @@ public interface MastodonApi {
@Nullable @Part(value="note") RequestBody note,
@Nullable @Part(value="locked") RequestBody locked,
@Nullable @Part MultipartBody.Part avatar,
@Nullable @Part MultipartBody.Part header);
@Nullable @Part MultipartBody.Part header,
@Nullable @Part(value="fields_attributes[0][name]") RequestBody fieldName0,
@Nullable @Part(value="fields_attributes[0][value]") RequestBody fieldValue0,
@Nullable @Part(value="fields_attributes[1][name]") RequestBody fieldName1,
@Nullable @Part(value="fields_attributes[1][value]") RequestBody fieldValue1,
@Nullable @Part(value="fields_attributes[2][name]") RequestBody fieldName2,
@Nullable @Part(value="fields_attributes[2][value]") RequestBody fieldValue2,
@Nullable @Part(value="fields_attributes[3][name]") RequestBody fieldName3,
@Nullable @Part(value="fields_attributes[3][value]") RequestBody fieldValue3);
@GET("api/v1/accounts/search")
Call<List<Account>> searchAccounts(
@Query("q") String q,
@Query("resolve") Boolean resolve,
@Query("limit") Integer limit);
@GET("api/v1/accounts/{id}")
Call<Account> account(@Path("id") String accountId);