mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
Fix Crash on closed PRs with deleted Fork (#559)
Fix edge-case DeletedFork of a Pull-Branch Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
parent
2483968f11
commit
f285d47a0b
@ -190,8 +190,15 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||||||
prMergeable.setText(String.valueOf(prModel.isMergeable()));
|
prMergeable.setText(String.valueOf(prModel.isMergeable()));
|
||||||
if(prModel.getHead() != null) {
|
if(prModel.getHead() != null) {
|
||||||
prHeadBranch.setText(prModel.getHead().getRef());
|
prHeadBranch.setText(prModel.getHead().getRef());
|
||||||
prIsFork.setText(String.valueOf(prModel.getHead().getRepo().isFork()));
|
if(prModel.getHead().getRepo() != null) {
|
||||||
prForkFullName.setText(prModel.getHead().getRepo().getFull_name());
|
prIsFork.setText(String.valueOf(prModel.getHead().getRepo().isFork()));
|
||||||
|
prForkFullName.setText(prModel.getHead().getRepo().getFull_name());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// pull was done from a deleted fork
|
||||||
|
prIsFork.setText("true");
|
||||||
|
prForkFullName.setText(context.getString(R.string.prDeletedFrok));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
prCommentsCount.setText(String.valueOf(prModel.getComments()));
|
prCommentsCount.setText(String.valueOf(prModel.getComments()));
|
||||||
|
|
||||||
|
@ -587,6 +587,7 @@
|
|||||||
<string name="unauthorizedApiError">Instance has returned an error - Unauthorized. Check your credentials and try again</string>
|
<string name="unauthorizedApiError">Instance has returned an error - Unauthorized. Check your credentials and try again</string>
|
||||||
<string name="loginTokenError">Please enter the correct token</string>
|
<string name="loginTokenError">Please enter the correct token</string>
|
||||||
|
|
||||||
|
<string name="prDeletedFrok">Deleted Fork</string>
|
||||||
<string name="noDataPullRequests">No pull requests found</string>
|
<string name="noDataPullRequests">No pull requests found</string>
|
||||||
<string name="prCreator">Creator :\u0020</string>
|
<string name="prCreator">Creator :\u0020</string>
|
||||||
<string name="editPrText">Edit Pull Request</string>
|
<string name="editPrText">Edit Pull Request</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user