Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resurvey drop-down #1101 #2251

Closed
wants to merge 5 commits into from
Closed

resurvey drop-down #1101 #2251

wants to merge 5 commits into from

Conversation

aarewhyan
Copy link
Contributor

fixed issue #1101
First started with the use of the spinner class for the drop-down and querying the taginfo class for the values of the selected keys but switched to AutoCompleteTextView and used Preset.getAutocompleteValues() method for querying, which was faster.
Still fixed the Server class to be run Asynchronously for the taginfo class.
Finally added the checkbox to enable, disable resurvey items.
Two questions here:

  • Should I change the keys dropdown to Preset.getObjectKeys and also remove address key?
  • Is my implementation of selected field which required updating the database to version -4 correct?

@simonpoole If you could review this and provide the necessary feedback, while I upload the test file.

@aarewhyan
Copy link
Contributor Author

aarewhyan commented Apr 26, 2023

checkboxes
drop-down

Copy link
Collaborator

@simonpoole simonpoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to Server.java is not necessary and not actually a fix as all methods using openConnection directly or indirectly are already executed in a separate thread if they are used in a relevant context (aka from the UI). This is preferable as there might be further processing (for example merging downloaded OSM data) that shouldn't be done on the UI thread.

@aarewhyan
Copy link
Contributor Author

I did see the use of separate threads being implemented and thought for the easy fix, I did not take in account for the rest of the processing being done on the same thread.
@simonpoole What can you say about the rest of the changes and should I change the keys drop-down?

@aarewhyan aarewhyan requested a review from simonpoole April 26, 2023 08:20
@simonpoole
Copy link
Collaborator

What can you say about the rest of the changes and should I change the keys drop-down?

I haven't got around to looking at in detail, will do so later this week.

@simonpoole
Copy link
Collaborator

Hi, two comments: you should squash the commits that don't add anything additional (aka remove the changes to the server code) with the original commit and then force push. 2nd I think "enabled" or "active" would be a better choice of name for the "selected" field.

Outside of that, this looks fine.

@aarewhyan
Copy link
Contributor Author

For the selected field I will definitely make the appropriate changes. As for squashing the commits I intended to do that before it is supposed to be merged the thing is, last week I thought of working on this issue #1706 but there seems to be some problem with my gradle build. So all these commits were actually just me trying to see if I had broken the code somewhere. I haven't been able to do any progress. If you don't mind could you point me in the right direction-

This is the error I get on my gradle build-
image

the stacktrace of this exception is -
Exception 1.txt

I also tried running it purely via the gradle wrapper and I got the following exception

Exception 2.txt

If you could point out my mistake I could move onto some other issue and even complete the test file for this patch.

@simonpoole
Copy link
Collaborator

The 1st problem looks like a gradle version issue, in general I would recommend using the wrapper as a number of the plugins depend strongly on the gradle version.

The 2nd issue is weirder, for debugging I would test if it goes away with maxParallelForks set to one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants