Fix text/plain mime

This commit is contained in:
lionel 2022-11-30 11:58:09 +01:00
parent 6a460b2952
commit 7ce4b9830b

View File

@ -300,7 +300,7 @@ public class DownloadFragment extends Fragment {
DownloadFile dl = (DownloadFile) DownloadFile.getFileById(id);
if(dl.type.equals("text/plain")) {
if(dl.mime.equals("text/plain")) {
String text = null;
try {
InputStream is = getActivity().getContentResolver().openInputStream(dl.uri);
@ -321,7 +321,7 @@ public class DownloadFragment extends Fragment {
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType(dl.type);
intent.setType(dl.mime);
intent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(intent, getString(R.string.share_title)));
} catch (ActivityNotFoundException e) {