diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 53cc360a9..f80922ccf 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1890,12 +1890,12 @@ public class ConversationFragment extends XmppFragment public void showRecordVoiceButton() { SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(activity); - final boolean ShowRecordVoiceButton = p.getBoolean("show_record_voice_btn", activity.getResources().getBoolean(R.bool.show_record_voice_btn)); - Log.d(Config.LOGTAG, "Recorder " + ShowRecordVoiceButton); - if (!ShowRecordVoiceButton || binding.textinput.getText().length() > 0) { + final boolean hideVoiceAndTakePicture = p.getBoolean("show_record_voice_btn", activity.getResources().getBoolean(R.bool.show_record_voice_btn)); + Log.d(Config.LOGTAG, "Recorder " + hideVoiceAndTakePicture); + if (!hideVoiceAndTakePicture || binding.textinput.getText().length() > 0) { binding.recordVoiceButton.setVisibility(GONE); binding.takePictureButton.setVisibility(GONE); - } else if (ShowRecordVoiceButton && binding.textinput.getText().length() < 1) { + } else if (hideVoiceAndTakePicture && binding.textinput.getText().length() < 1) { binding.recordVoiceButton.setVisibility(View.VISIBLE); binding.takePictureButton.setVisibility(View.VISIBLE); } diff --git a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java index 60719af5d..ee603bfa5 100644 --- a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java @@ -1275,6 +1275,8 @@ public class SettingsActivity extends XmppActivity implements OnSharedPreference reconnectAccounts(); } else if (name.equals("show_less_avatars")) { refreshUiReal(); + } else if (name.equals("show_record_voice_btn")) { + recreate(); } else if (name.equals(AUTOMATIC_MESSAGE_DELETION)) { xmppConnectionService.expireOldMessages(true); } else if (name.equals(THEME) || name.equals(THEME_COLOR) || name.equals("custom_theme_primary") || name.equals("custom_theme_primary_dark") || name.equals("custom_theme_accent") || name.equals("custom_theme_dark")) {