Skip to content

Commit

Permalink
Fix ver.Incompatible() workflow bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshin committed Jun 30, 2019
1 parent 201152b commit 5abc8bb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/options/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ function pRead() {
console.log( "current puread object is ", storage.pr )
}

/**
* Incompatible and update
*/
function updateData() {
ver.Incompatible( storage.version, storage.simpread ) && storage.Write( () => {
console.log( "current simpread is update ", storage.simpread )
watch.SendMessage( "option", true );
}, storage.simpread );
}

/**
* Hash notify
*/
Expand Down Expand Up @@ -173,7 +183,7 @@ function vernotify( first ) {
watch.SendMessage( "version", true );
loadState = { first: true, update: true };
welcomeRender( false, version );
ver.Incompatible( version, storage.simpread );
updateData();
}
// website_sync = true; when version is 1.1.3 website_list is newer
browser.runtime.sendMessage({ type: "track", value: { eventAction: hash.startsWith( "#firstload?ver=" ) ? "install" : "update" , eventCategory: "install", eventLabel: "install && update" } });
Expand Down

0 comments on commit 5abc8bb

Please sign in to comment.