Fix issue #16
This commit is contained in:
parent
735882fb7e
commit
0769082a8c
|
@ -199,8 +199,17 @@ public class MastodonHelper {
|
|||
Context context = view.getContext();
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean disableGif = sharedpreferences.getBoolean(context.getString(R.string.SET_DISABLE_GIF), false);
|
||||
String targetedUrl = disableGif ? (type == MediaAccountType.AVATAR ? account.avatar_static : account.header_static) : (type == MediaAccountType.AVATAR ? account.avatar : account.header);
|
||||
@DrawableRes int placeholder = type == MediaAccountType.AVATAR ? R.drawable.ic_person : R.drawable.default_banner;
|
||||
if (account == null) {
|
||||
Glide.with(view.getContext())
|
||||
.asDrawable()
|
||||
.load(placeholder)
|
||||
.thumbnail(0.1f)
|
||||
.placeholder(placeholder)
|
||||
.into(view);
|
||||
return;
|
||||
}
|
||||
String targetedUrl = disableGif ? (type == MediaAccountType.AVATAR ? account.avatar_static : account.header_static) : (type == MediaAccountType.AVATAR ? account.avatar : account.header);
|
||||
if (disableGif || (!targetedUrl.endsWith(".gif"))) {
|
||||
Glide.with(view.getContext())
|
||||
.asDrawable()
|
||||
|
|
|
@ -1052,8 +1052,10 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
if (statusDraft.visibility == null) {
|
||||
if (position > 0) {
|
||||
statusDraft.visibility = statusList.get(position - 1).visibility;
|
||||
} else {
|
||||
} else if (BaseMainActivity.accountWeakReference.get().mastodon_account != null) {
|
||||
statusDraft.visibility = BaseMainActivity.accountWeakReference.get().mastodon_account.source.privacy;
|
||||
} else {
|
||||
statusDraft.visibility = "public";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue