Merge branch 'bug_fixes' into develop

This commit is contained in:
tom79 2019-11-13 15:43:33 +01:00
commit 8e72c4e22e
2 changed files with 4 additions and 2 deletions

View File

@ -1473,7 +1473,9 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
Toasty.error(activityWeakReference.get(), activityWeakReference.get().getString(R.string.toast_error), Toast.LENGTH_SHORT).show();
error = true;
}
activityWeakReference.get().findViewById(R.id.compression_loader).setVisibility(View.VISIBLE);
if( activityWeakReference.get().findViewById(R.id.compression_loader) != null) {
activityWeakReference.get().findViewById(R.id.compression_loader).setVisibility(View.VISIBLE);
}
}

View File

@ -1135,7 +1135,7 @@ public class Helper {
}
final String fileName = URLUtil.guessFileName(url, null, null);
request.allowScanningByMediaScanner();
String myDir = sharedpreferences.getString(Helper.SET_FOLDER_RECORD, Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
String myDir = sharedpreferences.getString(Helper.SET_FOLDER_RECORD, Environment.DIRECTORY_DOWNLOADS);
request.setDestinationInExternalPublicDir(myDir, fileName);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
DownloadManager dm = (DownloadManager) context.getSystemService(DOWNLOAD_SERVICE);