Skip to content

Commit

Permalink
Fixed a download crash, new version code
Browse files Browse the repository at this point in the history
  • Loading branch information
CookieJarApps committed Oct 5, 2020
1 parent 2bb61a3 commit dc2878e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
defaultConfig {
minSdkVersion project.minSdkVersion
targetSdkVersion project.targetSdkVersion
versionName "9.0.1"
versionCode 119
versionName "9.0.2"
versionCode 120
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ public void onDownloadStart(@NonNull Activity context, @NonNull UserPreferences
// Enabling database for resume support even after the application is killed:
PRDownloaderConfig config = PRDownloaderConfig.newBuilder()
.setDatabaseEnabled(true)
.setReadTimeout(30_000)
.setConnectTimeout(30_000)
.build();
PRDownloader.initialize(context, config);

Expand Down Expand Up @@ -261,8 +263,11 @@ public void onCancel() {
@Override
public void onProgress(Progress progress) {
double perc = ((progress.currentBytes / (double) progress.totalBytes) * 100.0f);
builder.setProgress(100, (int) perc, false);
notificationManager.notify(uniqid, builder.build());

if (String.valueOf((int) perc).contains("0")) {
builder.setProgress(100, (int) perc, false);
notificationManager.notify(uniqid, builder.build());
}

}
})
Expand Down

0 comments on commit dc2878e

Please sign in to comment.