mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-07-21 06:44:49 -05:00
open release from dashboard
This commit is contained in:
@@ -315,6 +315,41 @@ public class DashboardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (activityObject
|
||||
.getOpType()
|
||||
.equalsIgnoreCase("publish_release")) {
|
||||
|
||||
itemView.setOnClickListener(
|
||||
v -> {
|
||||
RepositoryContext repo =
|
||||
new RepositoryContext(
|
||||
activityObject.getRepo(), context);
|
||||
|
||||
Intent repoIntent =
|
||||
new Intent(
|
||||
context, RepoDetailActivity.class);
|
||||
repoIntent.putExtra("goToSection", "yes");
|
||||
repoIntent.putExtra("goToSectionType", "releases");
|
||||
repoIntent.putExtra(
|
||||
"releaseTagName",
|
||||
activityObject
|
||||
.getRefName()
|
||||
.substring(
|
||||
activityObject
|
||||
.getRefName()
|
||||
.lastIndexOf(
|
||||
"/")
|
||||
+ 1)
|
||||
.trim());
|
||||
|
||||
repo.saveToDB(context);
|
||||
repoIntent.putExtra(
|
||||
RepositoryContext.INTENT_EXTRA, repo);
|
||||
|
||||
context.startActivity(repoIntent);
|
||||
});
|
||||
}
|
||||
},
|
||||
200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user