dont show delete file button when outside conversations directory. fixes #2007

This commit is contained in:
Daniel Gultsch 2016-09-16 12:29:12 +02:00
parent 3cdf5f9afc
commit 521469a57d

View file

@ -579,11 +579,14 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
cancelTransmission.setVisible(true);
}
if (treatAsFile) {
String path = m.getRelativeFilePath();
if (path == null || !path.startsWith("/")) {
deleteFile.setVisible(true);
deleteFile.setTitle(activity.getString(R.string.delete_x_file, UIHelper.getFileDescriptionString(activity, m)));
}
}
}
}
@Override
public boolean onContextItemSelected(MenuItem item) {