fix some crashes
This commit is contained in:
parent
1cb52f167f
commit
dcb41be114
|
@ -453,7 +453,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
||||||
|
|
||||||
public static String getVisibility(String defaultVisibility) {
|
public static String getVisibility(String defaultVisibility) {
|
||||||
int tootVisibility = visibilityToNumber(defaultVisibility);
|
int tootVisibility = visibilityToNumber(defaultVisibility);
|
||||||
if (currentAccount != null && currentAccount.mastodon_account.source != null) {
|
if (currentAccount != null && currentAccount.mastodon_account != null && currentAccount.mastodon_account.source != null) {
|
||||||
int userVisibility = visibilityToNumber(currentAccount.mastodon_account.source.privacy);
|
int userVisibility = visibilityToNumber(currentAccount.mastodon_account.source.privacy);
|
||||||
if (tootVisibility > userVisibility) {
|
if (tootVisibility > userVisibility) {
|
||||||
return visibilityToString(userVisibility);
|
return visibilityToString(userVisibility);
|
||||||
|
|
|
@ -482,7 +482,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
if (attachmentList != null && attachmentList.size() > 0) {
|
if (attachmentList != null && attachmentList.size() > 0) {
|
||||||
holder.binding.sensitiveMedia.setVisibility(View.VISIBLE);
|
holder.binding.sensitiveMedia.setVisibility(View.VISIBLE);
|
||||||
if (!statusList.get(position).sensitive) {
|
if (!statusList.get(position).sensitive) {
|
||||||
if (currentAccount.mastodon_account.source != null) {
|
if (currentAccount != null && currentAccount.mastodon_account != null && currentAccount.mastodon_account.source != null) {
|
||||||
holder.binding.sensitiveMedia.setChecked(currentAccount.mastodon_account.source.sensitive);
|
holder.binding.sensitiveMedia.setChecked(currentAccount.mastodon_account.source.sensitive);
|
||||||
statusList.get(position).sensitive = currentAccount.mastodon_account.source.sensitive;
|
statusList.get(position).sensitive = currentAccount.mastodon_account.source.sensitive;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue