Fix empty release notes bug Add new sponsor Fix bug #549, add more file ext to file viewer Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/560 Reviewed-by: opyale <opyale@noreply.codeberg.org> Reviewed-by: 6543 <6543@noreply.codeberg.org>
This commit is contained in:
parent
f285d47a0b
commit
95fc5e1e9a
@ -273,11 +273,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
String instanceUrlWithProtocol;
|
String instanceUrlWithProtocol;
|
||||||
if(protocol.toLowerCase().equals("https")) {
|
if(protocol.toLowerCase().equals("https")) {
|
||||||
instanceUrl = "https://" + instanceHost + "/api/v1/";
|
instanceUrl = "https://" + instanceHost + "/api/v1/";
|
||||||
instanceUrlWithProtocol = "https://" + instanceHost;
|
instanceUrlWithProtocol = "https://" + instanceHost + "/";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
instanceUrl = "http://" + instanceHost + "/api/v1/";
|
instanceUrl = "http://" + instanceHost + "/api/v1/";
|
||||||
instanceUrlWithProtocol = "http://" + instanceHost;
|
instanceUrlWithProtocol = "http://" + instanceHost + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
tinyDb.putString("instanceUrlRaw", instanceHost);
|
tinyDb.putString("instanceUrlRaw", instanceHost);
|
||||||
|
@ -59,6 +59,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
|||||||
private TextView repoStars;
|
private TextView repoStars;
|
||||||
private TextView repoForks;
|
private TextView repoForks;
|
||||||
private TextView repoOpenIssuesCount;
|
private TextView repoOpenIssuesCount;
|
||||||
|
private TextView repoType;
|
||||||
private LinearLayout archiveRepo;
|
private LinearLayout archiveRepo;
|
||||||
|
|
||||||
private ReposSearchViewHolder(View itemView) {
|
private ReposSearchViewHolder(View itemView) {
|
||||||
@ -75,6 +76,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
|||||||
repoForks = itemView.findViewById(R.id.repoForks);
|
repoForks = itemView.findViewById(R.id.repoForks);
|
||||||
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
|
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
|
||||||
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
||||||
|
repoType = itemView.findViewById(R.id.repoType);
|
||||||
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
@ -233,9 +235,11 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
|||||||
holder.fullName.setText(currentItem.getFullname());
|
holder.fullName.setText(currentItem.getFullname());
|
||||||
if(currentItem.getPrivateFlag()) {
|
if(currentItem.getPrivateFlag()) {
|
||||||
holder.repoPrivatePublic.setImageResource(R.drawable.ic_lock_bold);
|
holder.repoPrivatePublic.setImageResource(R.drawable.ic_lock_bold);
|
||||||
|
holder.repoType.setText(R.string.strPrivate);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.repoPrivatePublic.setImageResource(R.drawable.ic_public);
|
holder.repoPrivatePublic.setImageResource(R.drawable.ic_public);
|
||||||
|
holder.repoType.setText(R.string.strPublic);
|
||||||
}
|
}
|
||||||
holder.repoStars.setText(currentItem.getStars_count());
|
holder.repoStars.setText(currentItem.getStars_count());
|
||||||
holder.repoForks.setText(currentItem.getForks_count());
|
holder.repoForks.setText(currentItem.getForks_count());
|
||||||
|
@ -203,7 +203,7 @@ public class ReleasesAdapter extends RecyclerView.Adapter<ReleasesAdapter.Releas
|
|||||||
markwon.setParsedMarkdown(holder.releaseBodyContent, bodyWithMD);
|
markwon.setParsedMarkdown(holder.releaseBodyContent, bodyWithMD);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.releaseBodyContent.setVisibility(View.GONE);
|
holder.releaseBodyContent.setText(R.string.noReleaseBodyContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.downloadFrame.setOnClickListener(v -> {
|
holder.downloadFrame.setOnClickListener(v -> {
|
||||||
|
@ -261,7 +261,7 @@ public class AppUtil {
|
|||||||
|
|
||||||
public Boolean sourceCodeExtension(String ext) {
|
public Boolean sourceCodeExtension(String ext) {
|
||||||
|
|
||||||
String[] extValues = new String[]{"md", "json", "java", "go", "php", "c", "cc", "cpp", "h", "cxx", "cyc", "m", "cs", "bash", "sh", "bsh", "cv", "python", "perl", "pm", "rb", "ruby", "javascript", "coffee", "rc", "rs", "rust", "basic", "clj", "css", "dart", "lisp", "erl", "hs", "lsp", "rkt", "ss", "llvm", "ll", "lua", "matlab", "pascal", "r", "scala", "sql", "latex", "tex", "vb", "vbs", "vhd", "tcl", "wiki.meta", "yaml", "yml", "markdown", "xml", "proto", "regex", "py", "pl", "js", "html", "htm", "volt", "ini", "htaccess", "conf", "gitignore", "gradle", "txt", "properties", "bat", "twig"};
|
String[] extValues = new String[]{"md", "json", "java", "go", "php", "c", "cc", "cpp", "h", "cxx", "cyc", "m", "cs", "bash", "sh", "bsh", "cv", "python", "perl", "pm", "rb", "ruby", "javascript", "coffee", "rc", "rs", "rust", "basic", "clj", "css", "dart", "lisp", "erl", "hs", "lsp", "rkt", "ss", "llvm", "ll", "lua", "matlab", "pascal", "r", "scala", "sql", "latex", "tex", "vb", "vbs", "vhd", "tcl", "wiki.meta", "yaml", "yml", "markdown", "xml", "proto", "regex", "py", "pl", "js", "html", "htm", "volt", "ini", "htaccess", "conf", "gitignore", "gradle", "txt", "properties", "bat", "twig", "cvs", "cmake", "in", "info", "spec", "m4", "am", "dist", "pam"};
|
||||||
|
|
||||||
return Arrays.asList(extValues).contains(ext);
|
return Arrays.asList(extValues).contains(ext);
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<item>Sameer Gupta</item>
|
<item>Sameer Gupta</item>
|
||||||
<item>Yin Yihang</item>
|
<item>Yin Yihang</item>
|
||||||
<item>Svierne</item>
|
<item>Svierne</item>
|
||||||
|
<item>Sam Forest</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -217,6 +217,7 @@
|
|||||||
<string name="noDataReleasesTab">No releases found</string>
|
<string name="noDataReleasesTab">No releases found</string>
|
||||||
<string name="releaseTag">Tag: %1$s</string>
|
<string name="releaseTag">Tag: %1$s</string>
|
||||||
<string name="releasePublishedBy">Published by @%1$s</string>
|
<string name="releasePublishedBy">Published by @%1$s</string>
|
||||||
|
<string name="noReleaseBodyContent">Release notes are not provided by the publisher.</string>
|
||||||
|
|
||||||
<string name="collaboratorsNameToast">Collaborator : %1$s</string>
|
<string name="collaboratorsNameToast">Collaborator : %1$s</string>
|
||||||
<string name="noDataCollaboratorTab">No collaborators found</string>
|
<string name="noDataCollaboratorTab">No collaborators found</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user