mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
Allow navigating from issue to repo (#937)
Allow navigating from issue opend by link to go back to repo Closes #747 Co-authored-by: qwerty287 <ndev@web.de> Co-authored-by: M M Arif <mmarif@noreply.codeberg.org> Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/937 Reviewed-by: M M Arif <mmarif@noreply.codeberg.org> Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org> Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
parent
2b3b0fbe0f
commit
0e696eb46f
@ -100,6 +100,7 @@ public class DeepLinksActivity extends BaseActivity {
|
||||
if(!Objects.requireNonNull(data.getLastPathSegment()).contains("issues") & StringUtils.isNumeric(data.getLastPathSegment())) {
|
||||
|
||||
issueIntent.putExtra("issueNumber", data.getLastPathSegment());
|
||||
issueIntent.putExtra("openedFromLink", "true");
|
||||
|
||||
tinyDB.putString("issueNumber", data.getLastPathSegment());
|
||||
tinyDB.putString("issueType", "Issue");
|
||||
@ -316,6 +317,7 @@ public class DeepLinksActivity extends BaseActivity {
|
||||
|
||||
issueIntent.putExtra("issueNumber", index);
|
||||
issueIntent.putExtra("prMergeable", prInfo.isMergeable());
|
||||
issueIntent.putExtra("openedFromLink", "true");
|
||||
|
||||
if(prInfo.getHead() != null) {
|
||||
|
||||
|
@ -434,6 +434,11 @@ public class IssueDetailActivity extends BaseActivity implements LabelsListAdapt
|
||||
|
||||
if(id == android.R.id.home) {
|
||||
|
||||
if(getIntent().getStringExtra("openedFromLink") != null && getIntent().getStringExtra("openedFromLink").equals("true")) {
|
||||
Intent intent = new Intent(ctx, RepoDetailActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
}
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user