mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2023-12-13 20:50:18 +01:00
Fix label listing for users (#1217)
Fixes label listing if trying to change labels for a user-owned repo (not org). Fixes #1216 Co-authored-by: qwerty287 <ndev@web.de> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1217 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
4aef17bbe7
commit
8cea886163
1 changed files with 6 additions and 5 deletions
|
@ -47,10 +47,9 @@ public class LabelsActions {
|
|||
|
||||
if (issueLabelsList.size() > 0) {
|
||||
|
||||
for (int i = 0; i < issueLabelsList.size(); i++) {
|
||||
for (Label label : issueLabelsList) {
|
||||
|
||||
currentLabelsIds.add(
|
||||
Math.toIntExact(issueLabelsList.get(i).getId()));
|
||||
currentLabelsIds.add(Math.toIntExact(label.getId()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -111,10 +110,10 @@ public class LabelsActions {
|
|||
@NonNull retrofit2.Response<List<Label>>
|
||||
responseOrg) {
|
||||
|
||||
if (responseOrg.body() != null) {
|
||||
if (responseOrg.isSuccessful()
|
||||
&& responseOrg.body() != null) {
|
||||
|
||||
labelsList.addAll(responseOrg.body());
|
||||
materialAlertDialogBuilder.show();
|
||||
}
|
||||
|
||||
if (labelsList.isEmpty()) {
|
||||
|
@ -123,6 +122,8 @@ public class LabelsActions {
|
|||
ctx,
|
||||
ctx.getResources()
|
||||
.getString(R.string.noDataFound));
|
||||
} else {
|
||||
materialAlertDialogBuilder.show();
|
||||
}
|
||||
|
||||
labelsBinding.labelsRecyclerView.setAdapter(
|
||||
|
|
Loading…
Reference in a new issue