fix save to downloads menu item visibility

This commit is contained in:
kosyak 2024-06-05 22:40:34 +01:00
parent d037e940c7
commit 25cd65e4e7
2 changed files with 3 additions and 8 deletions

View file

@ -1871,9 +1871,9 @@ public class ConversationFragment extends XmppFragment
activity.getString( activity.getString(
R.string.delete_x_file, R.string.delete_x_file,
fileDescriptorString)); fileDescriptorString));
saveToDownloads.setVisible(true);
} }
saveToDownloads.setVisible(true);
} }
if (showError) { if (showError) {
showErrorMessage.setVisible(true); showErrorMessage.setVisible(true);

View file

@ -155,12 +155,7 @@ public class SearchActivity extends XmppActivity implements TextWatcher, OnSearc
(message.getTransferable() != null && !deleted) || waitingOfferedSending && message.needsUploading(); (message.getTransferable() != null && !deleted) || waitingOfferedSending && message.needsUploading();
if (message.isFileOrImage() && !deleted && !cancelable) { if (message.isFileOrImage() && !deleted && !cancelable) {
final String path = message.getRelativeFilePath(); saveToDownloads.setVisible(true);
if (path == null
|| !path.startsWith("/")
|| FileBackend.inConversationsDirectory(this, path)) {
saveToDownloads.setVisible(true);
}
} }
if (message.isGeoUri()) { if (message.isGeoUri()) {