forked from mirrors/Fedilab
Fix a bug with media not available
This commit is contained in:
parent
34a8a4ee85
commit
a3a3d9350e
1 changed files with 2 additions and 1 deletions
|
@ -132,6 +132,7 @@ public class FragmentMedia extends Fragment {
|
||||||
binding.pbarInf.setScaleY(1f);
|
binding.pbarInf.setScaleY(1f);
|
||||||
binding.pbarInf.setIndeterminate(true);
|
binding.pbarInf.setIndeterminate(true);
|
||||||
binding.loader.setVisibility(View.VISIBLE);
|
binding.loader.setVisibility(View.VISIBLE);
|
||||||
|
scheduleStartPostponedTransition(binding.mediaPicture);
|
||||||
if (Helper.isValidContextForGlide(requireActivity()) && isAdded()) {
|
if (Helper.isValidContextForGlide(requireActivity()) && isAdded()) {
|
||||||
Glide.with(requireActivity())
|
Glide.with(requireActivity())
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
@ -144,7 +145,7 @@ public class FragmentMedia extends Fragment {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
binding.mediaPicture.setImageBitmap(resource);
|
binding.mediaPicture.setImageBitmap(resource);
|
||||||
scheduleStartPostponedTransition(binding.mediaPicture);
|
|
||||||
if (attachment.type.equalsIgnoreCase("image") && !attachment.url.toLowerCase().endsWith(".gif")) {
|
if (attachment.type.equalsIgnoreCase("image") && !attachment.url.toLowerCase().endsWith(".gif")) {
|
||||||
binding.mediaPicture.setVisibility(View.VISIBLE);
|
binding.mediaPicture.setVisibility(View.VISIBLE);
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
|
|
Loading…
Reference in a new issue