Skip to content

Commit

Permalink
Merge pull request #3204 from Catrobat/hotfix-0.9.60
Browse files Browse the repository at this point in the history
Hotfix 0.9.60
  • Loading branch information
wslany authored Apr 24, 2019
2 parents 34ce3c7 + bd0ef51 commit fb5428a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions catroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ android {
targetSdkVersion 26
applicationId appId
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionCode 60
versionCode 61
println "VersionCode is $versionCode"
versionName "0.9.58"
versionName "0.9.60"
println "VersionName is $versionName"
buildConfigField "String", "GIT_COMMIT_INFO", "\"${getGitCommitInfo()}\""
buildConfigField "String", "MAIN_URL_HTTPS", (project.hasProperty('useWebTest') ? '"https://web-test.catrob.at"' : '"https://share.catrob.at"')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,16 @@ private void showProgressDialogAndUploadProject() {
final int notificationId = StatusBarNotificationManager.getInstance()
.createUploadNotification(this, name);

UploadStatusPollingTask uploadStatusPollingTask = new UploadStatusPollingTask();

uploadProgressDialog = new AlertDialog.Builder(this)
.setTitle(getString(R.string.upload_project_dialog_title))
.setView(R.layout.dialog_upload_project_progress)
.setPositiveButton(R.string.progress_upload_dialog_show_program, null)
.setNegativeButton(R.string.done, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
uploadStatusPollingTask.cancel(false);
finish();
}
})
Expand All @@ -306,8 +309,7 @@ public void onClick(DialogInterface dialog, int which) {

startService(intent);

new UploadStatusPollingTask()
.execute();
uploadStatusPollingTask.execute();

int numberOfUploadedProjects = sharedPreferences.getInt(NUMBER_OF_UPLOADED_PROJECTS, 0) + 1;
sharedPreferences.edit()
Expand Down Expand Up @@ -418,6 +420,9 @@ private class UploadStatusPollingTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... voids) {
while (StatusBarNotificationManager.getInstance().getProgressPercent() != 100) {
if (isCancelled()) {
break;
}
try {
Thread.sleep(100);
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ public void renameItem(ProjectData item, String name) {

@Override
public void onLoadFinished(boolean success) {
if (getActivity() == null) {
return;
}
if (success) {
Intent intent = new Intent(getActivity(), ProjectActivity.class);
intent.putExtra(ProjectActivity.EXTRA_FRAGMENT_POSITION, ProjectActivity.FRAGMENT_SCENES);
Expand Down

0 comments on commit fb5428a

Please sign in to comment.