Adjust new avatar picker logic.

* Better emoji rendering support
* Deleting an avatar will deselect it
* Added padding to the bottom of recyclers
* Disabled save if no edit / selection has been made.
* Clearing and saving will remove a user's avatar.
This commit is contained in:
Alex Hart
2021-07-21 13:35:47 -03:00
committed by Greyson Parrelli
parent a75f634c0a
commit a27d60f830
20 changed files with 293 additions and 119 deletions

View File

@@ -170,6 +170,12 @@ public class AddGroupDetailsFragment extends LoggingFragment {
}
private void handleMediaResult(Bundle data) {
if (data.getBoolean(AvatarPickerFragment.SELECT_AVATAR_CLEAR)) {
viewModel.setAvatarMedia(null);
viewModel.setAvatar(null);
return;
}
final Media result = data.getParcelable(AvatarPickerFragment.SELECT_AVATAR_MEDIA);
final DecryptableStreamUriLoader.DecryptableUri decryptableUri = new DecryptableStreamUriLoader.DecryptableUri(result.getUri());