mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 14:48:35 +00:00
Prevent sending revealable messages in Note to Self.
Send support isn't enabled yet, but didn't want to forget about it.
This commit is contained in:
parent
965de16de1
commit
5c870ca8ea
@ -59,7 +59,6 @@ class MediaSendViewModel extends ViewModel {
|
||||
private int maxSelection;
|
||||
private Page page;
|
||||
private boolean isSms;
|
||||
private Recipient recipient;
|
||||
private Optional<Media> lastCameraCapture;
|
||||
|
||||
private boolean hudVisible;
|
||||
@ -69,6 +68,7 @@ class MediaSendViewModel extends ViewModel {
|
||||
private RailState railState;
|
||||
private RevealState revealState;
|
||||
|
||||
private @Nullable Recipient recipient;
|
||||
|
||||
private MediaSendViewModel(@NonNull Application application, @NonNull MediaRepository repository) {
|
||||
this.application = application;
|
||||
@ -488,7 +488,7 @@ class MediaSendViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
private boolean revealSupported() {
|
||||
return !isSms && mediaSupportsRevealableMessage(getSelectedMediaOrDefault());
|
||||
return !isSms && (recipient == null || !recipient.isLocalNumber()) && mediaSupportsRevealableMessage(getSelectedMediaOrDefault());
|
||||
}
|
||||
|
||||
private boolean mediaSupportsRevealableMessage(@NonNull List<Media> media) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user