Do not show switch guide when there are no rules. Fix #524.

This commit is contained in:
FelisCatus 2015-09-07 15:28:50 +08:00
parent a6c5c26c37
commit 2ae2927def

View File

@ -408,5 +408,6 @@ angular.module('omega').controller 'SwitchProfileCtrl', ($scope, $rootScope,
getState = omegaTarget.state(['web.switchGuide', 'firstRun'])
$q.all([rulesReady, getState]).then ([_, [switchGuide, firstRun]]) ->
return if firstRun or switchGuide == 'shown'
return if $scope.profile.rules.length == 0
$script 'js/switch_profile_guide.js'
omegaTarget.state('web.switchGuide', 'shown')