diff --git a/app/components/Conflict.js b/app/components/Conflict.js index 64c8ac34e..1fb38283e 100644 --- a/app/components/Conflict.js +++ b/app/components/Conflict.js @@ -100,6 +100,17 @@ export default class Conflict extends React.Component { ) } + + featureIsAWay () { + return ( + + + Overwriting a conflicting line or area is not currently supported. Discard this edit and fetch latest data. + + + ) + } + renderDiff (prop) { let Fields if (prop.newValue) { @@ -217,6 +228,9 @@ export default class Conflict extends React.Component { if (updatedFeature.isDeleted) { return this.upstreamDeleted() } + if (originalEdit.newFeature.wayEditingHistory) { + return this.featureIsAWay() + } if (originalEdit.type === 'delete') { return this.featureDeleted() } diff --git a/app/screens/UserContributions/UserContributionsItemScreen.js b/app/screens/UserContributions/UserContributionsItemScreen.js index 5cafca74b..4d23b27f9 100644 --- a/app/screens/UserContributions/UserContributionsItemScreen.js +++ b/app/screens/UserContributions/UserContributionsItemScreen.js @@ -196,7 +196,19 @@ class UserContributionsItemScreen extends React.Component { ] } + getWayConflictActions () { + return [ + { + name: 'trash-bin', + onPress: this.discardEdit + } + ] + } + getHeaderActions (edit) { + if (edit.newFeature.wayEditingHistory) { + return this.getWayConflictActions() + } if (edit.status === 'success') { return this.getUploadedActions() }