fix loading default visibility

This commit is contained in:
sk 2023-01-24 09:31:49 +01:00 committed by LucasGGamerM
parent a5a293be78
commit 396836760a

View File

@ -1854,11 +1854,11 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
AccountSessionManager asm = AccountSessionManager.getInstance();
Preferences prefs = asm.getAccount(accountID).preferences;
if (prefs != null && replyTo != null) {
if (prefs != null) {
// Only override the reply visibility if our preference is more private
// (or we're replying to ourselves)
// (and we're not replying to ourselves, or not at all)
if (prefs.postingDefaultVisibility.isLessVisibleThan(statusVisibility) &&
!asm.isSelf(accountID, replyTo.account)) {
(replyTo == null || !asm.isSelf(accountID, replyTo.account))) {
statusVisibility = switch (prefs.postingDefaultVisibility) {
case PUBLIC -> StatusPrivacy.PUBLIC;
case UNLISTED -> StatusPrivacy.UNLISTED;