Add support for opening commit links (#1275)

- [x] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
- [x] I'm following the code standards as defined [here](https://codeberg.org/gitnex/GitNex/wiki/Code-Standards).
- [x] By submitting this pull request, I permit GitNex to license my work under
  the [GNU General Public License v3](https://codeberg.org/GitNex/GitNex/src/branch/main/LICENSE).

This closes #1268

Co-authored-by: Ensar Sarajčić <dev@ensarsarajcic.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1275
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: Ensar Sarajcic <esensar@noreply.codeberg.org>
Co-committed-by: Ensar Sarajcic <esensar@noreply.codeberg.org>
This commit is contained in:
Ensar Sarajcic 2023-07-18 05:22:03 +00:00 committed by M M Arif
parent a5daf4824b
commit 60f1317d6b
1 changed files with 10 additions and 0 deletions

View File

@ -702,6 +702,16 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
Intent intent1 = repository.getIntent(ctx, CommitsActivity.class);
ctx.startActivity(intent1);
break;
case "commit":
viewPager.setCurrentItem(0);
String sha = mainIntent.getStringExtra("sha");
if (getFragmentRefreshListenerFiles() != null) {
getFragmentRefreshListenerFiles().onRefresh(sha);
}
Intent commitIntent = repository.getIntent(ctx, CommitDetailActivity.class);
commitIntent.putExtra("sha", sha);
ctx.startActivity(commitIntent);
break;
case "issue":
viewPager.setCurrentItem(2);
break;