-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
bypass censorship in Russia #1438
Conversation
app/src/main/java/de/westnordost/streetcomplete/data/OsmModule.java
Outdated
Show resolved
Hide resolved
Aren't there any quests in StreetComplete that would fail to download if no attic data is available? (The construction quests) |
The construction quests use attic data in test suite, not in normal operation. Construction quests use "last modified" not requiring attic - but I may test is it actually working correctly. |
Ah okay |
Actually, I would very much prefer not to add a description of the Overpass URL to the localized strings but simply display the URL.
…On June 23, 2019 7:42:37 AM GMT+02:00, Mateusz Konieczny ***@***.***> wrote:
matkoniecz commented on this pull request.
> <string
name="quest_accessible_for_pedestrians_separate_sidewalk_explanation">This
street was tagged as having no sidewalk on either side. In the case
that there is a sidewalk after all but it is displayed as a separate
way, please answer \"sidewalk\".</string>
<string name="action_open_location">Open location in another
app</string>
<string name="map_application_missing">No other map application
installed</string>
<string name="label_housenumber">house number</string>
<string name="label_blocknumber">block number</string>
<string name="quest_busStopShelter_covered">Whole stop is
covered</string>
+ <string name="overpass_server_default">Default overpass server
provided by Roland Olbricht</string>
What version of attribution would be best?
> Default overpass server provided by FOSSGIS, administered by Roland
Olbricht
or
> Default overpass server provided by FOSSGIS e.V., administered by
Roland Olbricht
or
> Default overpass server provided by FOSSGIS e.V.
Pinging also @drolbr
|
Done. |
Tested to be sure. Attic queries are failing on Kumi servers (I reported this) but construction quest works without problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised that this works. It shouldn't, at least not before an app restart:
In the QuestModule
, the list of quest types that all make use of the OverpassMapDataDao
is created as a singleton. That means, the method QuestModule::questTypeRegistry
should only be called once on application start and then never again. The OverpassMapDataDao
to be used for each quest in that list is passed in in that function once. So, the Prefs.OVERPASS_URL
is only read once - when the OverpassMapDataDao
is created, to be used in the quest type registry that is also is created.
Not sure what is the best practice is in a case like this.
However, it is clear that this class should actually also be a @Singleton
because there should only ever be one instance of it as it handles the quota to Overpass. This makes exchanging the URL a bit easier because then, only the URL of one OverpassMapDataDao
needs to be exchanged. OsmConnection
, a field of that class, has a method named setApiUrl
, so there you go. Though, I am really not sure if this is a clean solution. It relies so much on the singleton-thing.
Other input or experience on what's the best practice on exchanging injected dependencies is welcome.
If there is no good solution, a cheap one would also be to require the user to re-start the app. Could be as cheap as mentioned in the description of the setting.
app/src/main/java/de/westnordost/streetcomplete/data/OsmModule.java
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/data/OsmModule.java
Outdated
Show resolved
Hide resolved
OK, that part was not tested - I changed setting, run queries that worked (using old server), added debug to confirm that server is changed, restarted, queries still worked and new server was appearing in logs. And yes, restart is required for option to actually apply according to a proper testing.
I did it for now. I will now try to research is there a good way to do this. |
That's fine actually. We don't expect users to change this server all the time. |
app/src/main/java/de/westnordost/streetcomplete/data/OsmModule.java
Outdated
Show resolved
Hide resolved
provide fallback overpas server (thanks to Kumi Systems for providing it!) fixes streetcomplete#1389
This reverts commit bc55cc648e3a4a1c7e8c0a1877fd4162f605ccdd.
thanks, waiting for next version :) |
This will be the next major version, not the version I just released 10mins ago. Beta of that version will be out earliest in 2 weeks or so. |
Great, I see some complains (with 2 stars) from Russian users in play market, hope they will increase number of stars after this fix. |
@westnordost should be able to reply to these complains. Maybe you can point them here… 😄 |
If someone is especially interested in this feature - texts for translations are already available for translation at POEditor (see https://github.com/westnordost/StreetComplete/blob/master/CONTRIBUTING.md#translating-the-app ) |
provide fallback Overpass server (thanks to Kumi Systems for providing it, and thanks again to Roland Olbricht for providing main Overpass instance)
fixes #1389
My work on this pull request was sponsored by a NGI Zero Discovery grant