Skip to content

Commit fdefede

Browse files
committed
Don't show ignored or completed walkthroughs
1 parent 170328b commit fdefede

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

package-lock.json

Lines changed: 1 addition & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/components/walkthrough/WalkthroughPortal.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,21 @@ export default class WalkthroughPortal extends Component {
5050
// }
5151

5252
componentWillMount() {
53-
const { walkthroughs } = this.props;
53+
const { completed, ignored, walkthroughs } = this.props;
5454

5555
if (typeof walkthroughs != 'undefined') {
5656
Object.keys(walkthroughs).forEach(name => {
5757
const walkthrough = walkthroughs[name];
5858

59+
// Ignore if we're not on the correct trigger URL
5960
const url = walkthrough.trigger.url;
6061
if (url && url != window.location.pathname) {
6162
return;
6263
}
64+
// Ignore if the walkthrough has already been completed or ignored
65+
if (completed.indexOf(name) > -1 || ignored.indexOf(name) > -1) {
66+
return;
67+
}
6368

6469
let trigger;
6570
switch (walkthrough.trigger.type) {

src/js/walkthrough/AudioWalkthrough.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default class AudioWalkthrough extends Walkthrough {
1010

1111
this.highlight_ids = [];
1212

13+
const AudioContext = window.AudioContext || window.webkitAudioContext;
1314
this.audioContext = new AudioContext();
1415
this.clock = new WAAClock(this.audioContext);
1516
this.events = [];

0 commit comments

Comments
 (0)