From 25cd65e4e794f15db4d5ec2b619e5efc94e41a02 Mon Sep 17 00:00:00 2001 From: kosyak Date: Wed, 5 Jun 2024 22:40:34 +0100 Subject: [PATCH] fix save to downloads menu item visibility --- .../eu/siacs/conversations/ui/ConversationFragment.java | 4 ++-- .../java/eu/siacs/conversations/ui/SearchActivity.java | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 5c864d673..dc97956b6 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1871,9 +1871,9 @@ public class ConversationFragment extends XmppFragment activity.getString( R.string.delete_x_file, fileDescriptorString)); - - saveToDownloads.setVisible(true); } + + saveToDownloads.setVisible(true); } if (showError) { showErrorMessage.setVisible(true); diff --git a/src/main/java/eu/siacs/conversations/ui/SearchActivity.java b/src/main/java/eu/siacs/conversations/ui/SearchActivity.java index df14b5272..460230601 100644 --- a/src/main/java/eu/siacs/conversations/ui/SearchActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/SearchActivity.java @@ -155,12 +155,7 @@ public class SearchActivity extends XmppActivity implements TextWatcher, OnSearc (message.getTransferable() != null && !deleted) || waitingOfferedSending && message.needsUploading(); if (message.isFileOrImage() && !deleted && !cancelable) { - final String path = message.getRelativeFilePath(); - if (path == null - || !path.startsWith("/") - || FileBackend.inConversationsDirectory(this, path)) { - saveToDownloads.setVisible(true); - } + saveToDownloads.setVisible(true); } if (message.isGeoUri()) {