Bug 1390042 - [Onboarding] The complete sign is not shown at first time when set the performance tour as the first item;r=rexboy

MozReview-Commit-ID: AVv4pcBfTbf

--HG--
extra : rebase_source : 9473bdec0897f284838433b3072cf31ff057fa14
This commit is contained in:
gasolin 2017-08-14 15:38:35 +08:00
Родитель 44eb96d181
Коммит 2a0da07c90
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -492,12 +492,6 @@ class Onboarding {
this.gotoPage(tourId); this.gotoPage(tourId);
this._removeTourFromNotificationQueue(tourId); this._removeTourFromNotificationQueue(tourId);
break; break;
// These tours are tagged completed instantly upon showing.
case "onboarding-tour-default-browser":
case "onboarding-tour-sync":
case "onboarding-tour-performance":
this.setToursCompleted([ evt.target.id ]);
break;
} }
let classList = evt.target.classList; let classList = evt.target.classList;
if (classList.contains("onboarding-tour-item")) { if (classList.contains("onboarding-tour-item")) {
@ -557,6 +551,15 @@ class Onboarding {
li.classList.remove("onboarding-active"); li.classList.remove("onboarding-active");
} }
} }
switch (tourId) {
// These tours should tagged completed instantly upon showing.
case "onboarding-tour-default-browser":
case "onboarding-tour-sync":
case "onboarding-tour-performance":
this.setToursCompleted([tourId]);
break;
}
} }
isTourCompleted(tourId) { isTourCompleted(tourId) {