aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-08-05 18:13:19 +0200
committerChristian Schneppe <christian@pix-art.de>2018-08-05 18:13:19 +0200
commitbbb53526f80c14d9ddc0f25ad5516a600e1868fa (patch)
treeb2493a52a8eefd377e2b5986f42a82886d2b3247 /src/main/java/de/pixart/messenger/ui/util
parentb890f6e78f69f55a553d2fff92b0e82e10d97af2 (diff)
add a quick action for voice recording
* is enabled as default * can be disabled in settings
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java
index 98a73addc..5c86b4a1b 100644
--- a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java
+++ b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java
@@ -53,11 +53,14 @@ public class ConversationMenuConfigurator {
locationAvailable = context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS) || context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LOCATION_NETWORK);
}
- public static void configureQuickShareAttachmentMenu(@NonNull Conversation conversation, Menu menu) {
+ public static void configureQuickShareAttachmentMenu(@NonNull Conversation conversation, Menu menu, boolean hideVoice) {
final boolean visible = SendButtonTool.AttachmentsVisible(conversation);
if (!visible) {
return;
}
+ if (hideVoice) {
+ microphoneAvailable = false;
+ }
menu.findItem(R.id.attach_record_voice).setVisible(microphoneAvailable);
menu.findItem(R.id.attach_location).setVisible(locationAvailable);
}