Allow nav from issue to repo when coming from explore/notifications (#988)

Adds the navigation to explore/notifications too
closes #747

Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/988
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
qwerty287 2021-10-04 21:08:34 +02:00 committed by M M Arif
parent 6d9a64596f
commit ba930021e7
2 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,7 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
itemView.setOnClickListener(v -> {
Intent intent = new Intent(context, IssueDetailActivity.class);
intent.putExtra("issueNumber", issue.getNumber());
intent.putExtra("openedFromLink", "true");
tinyDb.putString("issueNumber", String.valueOf(issue.getNumber()));
tinyDb.putString("issueType", "Issue");

View File

@ -331,6 +331,7 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
if(StringUtils.containsAny(notificationThread.getSubject().getType().toLowerCase(), "pull", "issue")) {
Intent intent = new Intent(context, IssueDetailActivity.class);
intent.putExtra("openedFromLink", "true");
String issueUrl = notificationThread.getSubject().getUrl();
tinyDB.putString("issueNumber", issueUrl.substring(issueUrl.lastIndexOf("/") + 1));
tinyDB.putString("issueType", notificationThread.getSubject().getType());