|
|
@ -153,15 +153,21 @@ public abstract class SFragment extends BaseFragment { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
popup.inflate(R.menu.status_more_for_user); |
|
|
|
popup.inflate(R.menu.status_more_for_user); |
|
|
|
Menu menu = popup.getMenu(); |
|
|
|
Menu menu = popup.getMenu(); |
|
|
|
if (status.getVisibility() == Status.Visibility.PRIVATE) { |
|
|
|
switch (status.getVisibility()) { |
|
|
|
boolean reblogged = status.getReblogged(); |
|
|
|
case PUBLIC: |
|
|
|
if (status.getReblog() != null) reblogged = status.getReblog().getReblogged(); |
|
|
|
case UNLISTED: { |
|
|
|
menu.findItem(R.id.status_reblog_private).setVisible(!reblogged); |
|
|
|
final String textId = |
|
|
|
menu.findItem(R.id.status_unreblog_private).setVisible(reblogged); |
|
|
|
getString(status.isPinned() ? R.string.unpin_action : R.string.pin_action); |
|
|
|
} else { |
|
|
|
menu.add(0, R.id.pin, 1, textId); |
|
|
|
final String textId = |
|
|
|
break; |
|
|
|
getString(status.getPinned() ? R.string.unpin_action : R.string.pin_action); |
|
|
|
} |
|
|
|
menu.add(0, R.id.pin, 1, textId); |
|
|
|
case PRIVATE: { |
|
|
|
|
|
|
|
boolean reblogged = status.getReblogged(); |
|
|
|
|
|
|
|
if (status.getReblog() != null) reblogged = status.getReblog().getReblogged(); |
|
|
|
|
|
|
|
menu.findItem(R.id.status_reblog_private).setVisible(!reblogged); |
|
|
|
|
|
|
|
menu.findItem(R.id.status_unreblog_private).setVisible(reblogged); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
popup.setOnMenuItemClickListener(item -> { |
|
|
|
popup.setOnMenuItemClickListener(item -> { |
|
|
@ -219,7 +225,7 @@ public abstract class SFragment extends BaseFragment { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
case R.id.pin: { |
|
|
|
case R.id.pin: { |
|
|
|
timelineCases().pin(status, !status.getPinned()); |
|
|
|
timelineCases().pin(status, !status.isPinned()); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|