some fixes.

This commit is contained in:
Thomas 2022-12-02 16:14:57 +01:00
parent 4e2701cb5e
commit 0f876f501b
1 changed files with 4 additions and 1 deletions

View File

@ -270,18 +270,21 @@ public class ProfileActivity extends BaseActivity {
@Override @Override
public void onResourceReady(@NonNull final Drawable resource, Transition<? super Drawable> transition) { public void onResourceReady(@NonNull final Drawable resource, Transition<? super Drawable> transition) {
binding.profilePicture.setImageDrawable(resource); binding.profilePicture.setImageDrawable(resource);
binding.accountPp.setImageDrawable(resource);
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this); ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
} }
@Override @Override
public void onLoadFailed(@Nullable Drawable errorDrawable) { public void onLoadFailed(@Nullable Drawable errorDrawable) {
binding.profilePicture.setImageResource(R.drawable.ic_person); binding.profilePicture.setImageResource(R.drawable.ic_person);
binding.accountPp.setImageResource(R.drawable.ic_person);
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this); ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
} }
@Override @Override
public void onLoadCleared(@Nullable Drawable placeholder) { public void onLoadCleared(@Nullable Drawable placeholder) {
binding.profilePicture.setImageResource(R.drawable.ic_person); binding.profilePicture.setImageResource(R.drawable.ic_person);
binding.accountPp.setImageResource(R.drawable.ic_person);
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this); ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
} }
} }
@ -387,7 +390,7 @@ public class ProfileActivity extends BaseActivity {
TextView.BufferType.SPANNABLE); TextView.BufferType.SPANNABLE);
binding.accountNote.setMovementMethod(LinkMovementMethod.getInstance()); binding.accountNote.setMovementMethod(LinkMovementMethod.getInstance());
MastodonHelper.loadPPMastodon(binding.accountPp, account); //MastodonHelper.loadPPMastodon(binding.accountPp, account);
binding.accountPp.setOnClickListener(v -> { binding.accountPp.setOnClickListener(v -> {
Intent intent = new Intent(ProfileActivity.this, MediaActivity.class); Intent intent = new Intent(ProfileActivity.this, MediaActivity.class);
Bundle b = new Bundle(); Bundle b = new Bundle();