Some fixes
This commit is contained in:
parent
a42ab35702
commit
497da30eb3
|
@ -699,8 +699,13 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
icon.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.mastodonC4), PorterDuff.Mode.SRC_IN);
|
||||
if (viewPager.getAdapter() != null) {
|
||||
Fragment fragment = (Fragment) viewPager.getAdapter().instantiateItem(viewPager, tab.getPosition());
|
||||
DisplayStatusFragment displayStatusFragment = ((DisplayStatusFragment) fragment);
|
||||
displayStatusFragment.scrollToTop();
|
||||
if( fragment instanceof DisplayStatusFragment) {
|
||||
DisplayStatusFragment displayStatusFragment = ((DisplayStatusFragment) fragment);
|
||||
displayStatusFragment.scrollToTop();
|
||||
}else if(fragment instanceof DisplayNotificationsFragment){
|
||||
DisplayNotificationsFragment displayNotificationsFragment = ((DisplayNotificationsFragment) fragment);
|
||||
displayNotificationsFragment.scrollToTop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -587,9 +587,15 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
|
|||
}else if(status.getMedia_attachments() != null ){
|
||||
holder.art_media.setVisibility(View.VISIBLE);
|
||||
holder.imageSlider.setVisibility(View.GONE);
|
||||
String url;
|
||||
if(status.getMedia_attachments().get(0).getPreview_url().endsWith("no-preview.png") ){
|
||||
url = status.getMedia_attachments().get(0).getUrl();
|
||||
}else{
|
||||
url = status.getMedia_attachments().get(0).getPreview_url();
|
||||
}
|
||||
GlideApp.with(context)
|
||||
.asBitmap()
|
||||
.load(status.getMedia_attachments().get(0).getPreview_url())
|
||||
.load(url)
|
||||
.into(holder.art_media);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue