Skip to content

Show notification to view Changelog after update #22

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

Merged
merged 2 commits into from
May 15, 2018
Merged

Show notification to view Changelog after update #22

merged 2 commits into from
May 15, 2018

Conversation

Raamakrishnan
Copy link
Contributor

Added a feature to show a notification with an option to open the changelog when the extension gets updated #14

// Get current version
let currVersion: string = extensions.getExtension(extensionID).packageJSON.version;
let cv = currVersion.split('.').map(Number);
// check if current version > previous version
Copy link
Owner

Choose a reason for hiding this comment

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

Could be more simple like this.

// update the value
context.globalState.update("version", currVersion);

// check if current version > previous version
for (let i = 0; i < pv.length; i++) {
    if(pv[i] == cv[i])
        continue;
    else if(pv[i] < cv[i])
        showUpdatedNotif();
    return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@mshr-h
Copy link
Owner

mshr-h commented May 15, 2018

Ok.

@mshr-h mshr-h merged commit eb64e79 into mshr-h:master May 15, 2018
@Raamakrishnan Raamakrishnan deleted the updateNotif branch July 7, 2018 15:01
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