Don't reuse changeset comment, sources, and hashtags from prior uploads (close #6642, re: #6279)

This commit is contained in:
Quincy Morgan
2019-07-22 16:12:20 -04:00
parent 9d90cb9ce4
commit eb49a367b4
4 changed files with 35 additions and 21 deletions
+16 -1
View File
@@ -65,6 +65,21 @@ export function uiCommit(context) {
// Initialize changeset if one does not exist yet.
// Also pull values from local storage.
if (!_changeset) {
// load in the URL hash values, if any
var hash = context.ui().hash;
if (hash.comment) {
context.storage('comment', hash.comment);
context.storage('commentDate', Date.now());
}
if (hash.source) {
context.storage('source', hash.source);
context.storage('commentDate', Date.now());
}
if (hash.hashtags) {
context.storage('hashtags', hash.hashtags);
}
var detected = utilDetect();
tags = {
comment: context.storage('comment') || '',
@@ -94,7 +109,7 @@ export function uiCommit(context) {
if (sources.indexOf('streetlevel imagery') === -1) {
sources.push('streetlevel imagery');
}
// add the photo overlays used during editing as sources
photoOverlaysUsed.forEach(function(photoOverlay) {
if (sources.indexOf(photoOverlay) === -1) {