Fixes a incompatibility-related crash when the hiding media previews option is selected and the device is API level 19 or under.

This commit is contained in:
Vavassor 2017-07-28 11:54:57 -04:00
parent a86c8df81b
commit 4a30af43df

View File

@ -23,6 +23,7 @@ import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.content.res.AppCompatResources;
import android.support.v7.widget.RecyclerView;
import android.text.Spanned;
import android.view.View;
@ -344,7 +345,7 @@ public class StatusViewHolder extends RecyclerView.ViewHolder {
// Set the icon next to the label.
int drawableId = getLabelIcon(attachments[0].type);
Drawable drawable = ContextCompat.getDrawable(context, drawableId);
Drawable drawable = AppCompatResources.getDrawable(context, drawableId);
ThemeUtils.setDrawableTint(context, drawable, android.R.attr.textColorTertiary);
mediaLabel.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);