mirror of
https://codeberg.org/gitnex/GitNex
synced 2025-01-22 23:49:58 +01:00
Fix commit crash (#1096)
Fixes another null pointer crash on commits. You can try this on our emoji-java fork, it will crash on `main`. Co-authored-by: qwerty287 <ndev@web.de> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1096 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:
parent
84e8850d9f
commit
062fb9e9fd
@ -125,7 +125,6 @@ public class CommitsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||
TimeHelper
|
||||
.formatTime(commitsModel.getCommit().getCommitter().getDate(), context.getResources().getConfiguration().locale, "pretty",
|
||||
context)), HtmlCompat.FROM_HTML_MODE_COMPACT));
|
||||
|
||||
}
|
||||
|
||||
if(commitsModel.getAuthor() != null && commitsModel.getAuthor().getAvatar_url() != null &&
|
||||
@ -148,7 +147,7 @@ public class CommitsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||
}
|
||||
|
||||
if(commitsModel.getCommitter() != null &&
|
||||
!commitsModel.getAuthor().getLogin().equals(commitsModel.getCommitter().getLogin()) &&
|
||||
(commitsModel.getAuthor() == null || !commitsModel.getAuthor().getLogin().equals(commitsModel.getCommitter().getLogin())) &&
|
||||
commitsModel.getCommitter().getAvatar_url() != null &&
|
||||
!commitsModel.getCommitter().getAvatar_url().isEmpty()) {
|
||||
|
||||
|
@ -195,7 +195,7 @@ public class CommitDetailFragment extends Fragment {
|
||||
}
|
||||
|
||||
if(commitsModel.getCommitter() != null &&
|
||||
!commitsModel.getAuthor().getLogin().equals(commitsModel.getCommitter().getLogin()) &&
|
||||
(commitsModel.getAuthor() == null || !commitsModel.getAuthor().getLogin().equals(commitsModel.getCommitter().getLogin())) &&
|
||||
commitsModel.getCommitter().getAvatar_url() != null &&
|
||||
!commitsModel.getCommitter().getAvatar_url().isEmpty()) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user