diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java | 9 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java | 1 |
2 files changed, 7 insertions, 3 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 39fc09241..fd5a5c441 100644 --- a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java +++ b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java @@ -31,10 +31,11 @@ package de.pixart.messenger.ui.util; import android.content.Context; import android.content.pm.PackageManager; -import androidx.annotation.NonNull; import android.view.Menu; import android.view.MenuItem; +import androidx.annotation.NonNull; + import de.pixart.messenger.Config; import de.pixart.messenger.R; import de.pixart.messenger.crypto.OmemoSetting; @@ -69,14 +70,16 @@ public class ConversationMenuConfigurator { return; } final MenuItem menuAttach = menu.findItem(R.id.action_attach_file); - if (Quick_share_attachment_choice && !hasAttachments) { + final boolean isPM = conversation.getMode() == Conversation.MODE_MULTI && conversation.getNextCounterpart() != null; + if (Quick_share_attachment_choice && !hasAttachments && !isPM) { menuAttach.setVisible(false); return; } final boolean visible; if (conversation.getMode() == Conversation.MODE_MULTI) { - visible = conversation.getAccount().httpUploadAvailable() && conversation.getMucOptions().participating(); + visible = conversation.getAccount().httpUploadAvailable() && conversation.getMucOptions().participating() + || conversation.getAccount().httpUploadAvailable() && isPM; } else { visible = true; } diff --git a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java index d6f5c0f2b..a58f683d3 100644 --- a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java +++ b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java @@ -204,6 +204,7 @@ public final class MucDetailsContextMenuHelper { if (activity instanceof ConversationsActivity) { ConversationFragment conversationFragment = ConversationFragment.get(activity); if (conversationFragment != null) { + activity.invalidateOptionsMenu(); conversationFragment.privateMessageWith(user.getFullJid()); return true; } |