Keep track of the initial hash parameters through multiple loads of the UI (close #7504)

This commit is contained in:
Quincy Morgan
2020-04-14 14:03:18 -07:00
parent 417caba3be
commit d7e5aa6735
3 changed files with 13 additions and 19 deletions
+6 -7
View File
@@ -75,17 +75,16 @@ export function uiCommit(context) {
if (!_changeset) {
// load in the URL hash values, if any
var hashBehavior = context.ui().hash;
if (hashBehavior.comment) {
prefs('comment', hashBehavior.comment);
if (context.initialHashParams.comment) {
prefs('comment', context.initialHashParams.comment);
prefs('commentDate', Date.now());
}
if (hashBehavior.source) {
prefs('source', hashBehavior.source);
if (context.initialHashParams.source) {
prefs('source', context.initialHashParams.source);
prefs('commentDate', Date.now());
}
if (hashBehavior.hashtags) {
prefs('hashtags', hashBehavior.hashtags);
if (context.initialHashParams.hashtags) {
prefs('hashtags', context.initialHashParams.hashtags);
}
var detected = utilDetect();