#224 Show only issues in issues list

Closed
opened 3 months ago by mmarif · 6 comments
mmarif commented 3 months ago

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 3 months ago
mmarif added the
Improvement
label 3 months ago
mmarif closed this issue 3 months ago
mmarif was assigned by 6543 3 months ago
6543 self-assigned this 3 months ago
mmarif commented 3 months ago
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.
mmarif commented 3 months ago
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
6543 commented 3 months ago
Collaborator

it is not as simple as it looks like :(

it is not as simple as it looks like :(
mmarif commented 3 months ago
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.
6543 commented 3 months ago
Collaborator

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
6543 commented 3 months ago
Collaborator
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 Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.