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

Avoid roads export import #8534

Merged
merged 14 commits into from
Feb 25, 2020
Merged

Avoid roads export import #8534

merged 14 commits into from
Feb 25, 2020

Conversation

veliymolfar
Copy link
Contributor

No description provided.

@@ -72,7 +72,7 @@
<string name="sunset_at">Sunset at %1$s</string>
<string name="sunrise_at">Sunrise at %1$s</string>
<string name="shared_string_routing">Routing</string>
<string name="shared_string_custom_rendering_style">Custom rendering style</string>
<string name="shared_string_custom_rendering_style">Rendering styles</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Translations

@vshcherb vshcherb marked this pull request as ready for review February 24, 2020 15:47
@vshcherb vshcherb changed the base branch from master to r3.6 February 24, 2020 15:47
@@ -801,7 +805,7 @@ SettingsItemReader getReader() {
@Override
public void readFromStream(@NonNull InputStream inputStream) throws IOException, IllegalArgumentException {
OutputStream output;
if (shouldReplace || !file.exists()) {
if (!file.exists() || file.exists() && shouldReplace) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Simplify


@NonNull
@Override
public List<AvoidRoadInfo> excludeDuplicateItems() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Implement in superclass

@Override
public boolean isDuplicate(@NonNull AvoidRoadInfo item) {
for (AvoidRoadInfo existingItem : existingItems) {
if (item.latitude == existingItem.latitude
Copy link
Contributor

Choose a reason for hiding this comment

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

Implement equals in AvoidRoadInfo

@@ -1622,7 +1830,12 @@ void importItems(@NonNull File file, @NonNull List<SettingsItem> items) throws I
if (item != null && collecting && item.shouldReadOnCollecting()
|| item != null && !collecting && !item.shouldReadOnCollecting()) {
try {
item.getReader().readFromStream(ois);
for (SettingsItem settingsItem : items) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace with if (items.contains(item))

@vshcherb vshcherb force-pushed the avoid_roads_export_import branch 2 times, most recently from 10f7b77 to 4fc18f0 Compare February 24, 2020 18:04
@max-klaus max-klaus merged commit f2b1040 into r3.6 Feb 25, 2020
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