Show only issues in issues list #224

Closed
opened 2020-06-03 23:21:10 +00:00 by mmarif · 6 comments
Owner

Currently the recyclerview remove the records if it is related to PR in issues list. Scrolling should be smooth without the need to feel the rearrangement.

It affects open closed issues list.

Currently the recyclerview remove the records if it is related to PR in issues list. Scrolling should be smooth without the need to feel the rearrangement. It affects open closed issues list.
mmarif added this to the 2.5.0 milestone 2020-06-03 23:21:10 +00:00
mmarif added the
🚀 Improvement
label 2020-06-03 23:21:10 +00:00
mmarif was assigned by 6543 2020-06-03 23:21:51 +00:00
6543 self-assigned this 2020-06-03 23:21:51 +00:00
Author
Owner

@6543 by any chance pull requests can be removed from issues list API. There is also pull requests API which do provide list of PRs. So there is no need to add same pull requests data to issues list API.

https://gitea.com/api/v1/repos/gitnex/Gitnex/issues?page=1state=open

"pull_request": {
      "merged": false,
      "merged_at": null
    },

Why?, because currently issues list screen show pr also. I have removed them in the app, but it created other problems in the adapter. It rearrange the list and it looks clunky.

Issues API : return only issues
PR API : return only prs

Check the issues list in the app, and you will see what I am talking about.

If you have any other solution, please share.

@6543 by any chance pull requests can be removed from issues list API. There is also pull requests API which do provide list of PRs. So there is no need to add same pull requests data to issues list API. https://gitea.com/api/v1/repos/gitnex/Gitnex/issues?page=1state=open ``` "pull_request": { "merged": false, "merged_at": null }, ``` Why?, because currently issues list screen show pr also. I have removed them in the app, but it created other problems in the adapter. It rearrange the list and it looks clunky. Issues API : return only issues PR API : return only prs Check the issues list in the app, and you will see what I am talking about. If you have any other solution, please share.
Author
Owner

This is what I introduced in 2.3.0 release, but it had its own problems(mentioned above).

https://gitea.com/gitnex/GitNex/src/branch/master/app/src/main/java/org/mian/gitnex/adapters/IssuesAdapter.java#L171

This is what I introduced in 2.3.0 release, but it had its own problems(mentioned above). https://gitea.com/gitnex/GitNex/src/branch/master/app/src/main/java/org/mian/gitnex/adapters/IssuesAdapter.java#L171
Member

it is not as simple as it looks like :(

it is not as simple as it looks like :(
Author
Owner

Not simple from Gitea side you mean?

I haven't dig to the code/db schema yet, but what I guess there is a field which may store the type(either issue or pr). Then in the query part can filter records by that type like how it is done in pr api.

I maybe wrong though.

Not simple from Gitea side you mean? I haven't dig to the code/db schema yet, but what I guess there is a field which may store the type(either issue or pr). Then in the query part can filter records by that type like how it is done in pr api. I maybe wrong though.
Member

of course in gitea it is easy ... but the api dont export the flag

of course in gitea it is easy ... but the api dont export the flag
Member
issue := models.Issue{...}
fmt.Println("bool value: %t", issue.IsPull)
``` issue := models.Issue{...} fmt.Println("bool value: %t", issue.IsPull) ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#224
No description provided.