Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
briar
briar
Commits
8858b7dd
Verified
Commit
8858b7dd
authored
Mar 01, 2021
by
akwizgran
Browse files
Show disabled menu item if we support feature but contact doesn't.
parent
f584041f
Pipeline
#5862
passed with stages
in 10 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
briar-android/src/main/java/org/briarproject/briar/android/conversation/ConversationActivity.java
View file @
8858b7dd
...
...
@@ -373,14 +373,13 @@ public class ConversationActivity extends BriarActivity
// enable alias action if available
observeOnce
(
viewModel
.
getContactItem
(),
this
,
contact
->
menu
.
findItem
(
R
.
id
.
action_set_alias
).
setEnabled
(
true
));
//
s
how auto-delete
timer setting only, if contacts supports it
//
S
how auto-delete
menu item if feature is enabled
if
(
featureFlags
.
shouldEnableDisappearingMessages
())
{
observeOnce
(
viewModel
.
getPrivateMessageFormat
(),
this
,
format
->
{
boolean
visible
=
format
==
TEXT_IMAGES_AUTO_DELETE
;
MenuItem
item
=
menu
.
findItem
(
R
.
id
.
action_conversation_settings
);
item
.
setVisible
(
visible
);
});
MenuItem
item
=
menu
.
findItem
(
R
.
id
.
action_conversation_settings
);
item
.
setVisible
(
true
);
// Enable menu item only if contact supports auto-delete
observeOnce
(
viewModel
.
getPrivateMessageFormat
(),
this
,
format
->
item
.
setEnabled
(
format
==
TEXT_IMAGES_AUTO_DELETE
));
}
return
super
.
onCreateOptionsMenu
(
menu
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment