fix phone right edge when there's only one app running
commit9eacc365b429fddca8b16e18b19bfce3cce977a9
authorMichael Zanetti <michael.zanetti@canonical.com>
dateTue 1 Jul 2014, 15:27 (12 years ago)
parented4e7bf
qml/Stages/PhoneStage.qml+4
@@ -179,6 +179,10 @@ Item {
179179 }
180180 }
181181 function snapTo(index) {
182+ if (ApplicationManager.count >= index) {
183+ // In case we're trying to snap to some non existing app, lets snap back to the first one
184+ index = 0;
185+ }
182186 spreadView.selectedIndex = index;
183187 root.fullscreen = ApplicationManager.get(index).fullscreen;
184188 snapAnimation.targetContentX = -shift;