Fix issue #678 - Wrong instance fetched for instances.social

This commit is contained in:
Thomas 2022-12-25 16:40:08 +01:00
parent da367ac0c0
commit f38ae254c1

View file

@ -81,6 +81,12 @@ public class InstanceHealthActivity extends BaseAlertDialogActivity {
instanceSocialVM.getInstances(BaseMainActivity.currentInstance.trim()).observe(InstanceHealthActivity.this, instanceSocialList -> {
if (instanceSocialList != null && instanceSocialList.instances.size() > 0) {
InstanceSocial.Instance instanceSocial = instanceSocialList.instances.get(0);
for (InstanceSocial.Instance instance : instanceSocialList.instances) {
if (instance.name.equalsIgnoreCase(BaseMainActivity.currentInstance.trim())) {
instanceSocial = instance;
break;
}
}
if (instanceSocial.thumbnail != null && !instanceSocial.thumbnail.equals("null"))
Glide.with(InstanceHealthActivity.this)
.asBitmap()