when adding new repos via Intents, clean out Activities from the Task

This commit is contained in:
Hans-Christoph Steiner 2018-06-21 15:12:22 +02:00
parent 1a7c73064f
commit 06e922a35e
2 changed files with 5 additions and 0 deletions

View File

@ -271,6 +271,9 @@ public class ManageReposActivity extends AppCompatActivity
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
dialog.dismiss(); dialog.dismiss();
if (isImportingRepo) {
ManageReposActivity.this.finish();
}
} }
}); });

View File

@ -345,8 +345,10 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB
} else { } else {
startActivity(new Intent(ACTION_ADD_REPO, intent.getData(), this, ManageReposActivity.class)); startActivity(new Intent(ACTION_ADD_REPO, intent.getData(), this, ManageReposActivity.class));
} }
finish();
} else if (parser.getErrorMessage() != null) { } else if (parser.getErrorMessage() != null) {
Toast.makeText(this, parser.getErrorMessage(), Toast.LENGTH_LONG).show(); Toast.makeText(this, parser.getErrorMessage(), Toast.LENGTH_LONG).show();
finish();
} }
} }
} }