@@ -58,7 +58,7 @@ Showable {
5858 if (!showAnimation.running && !hideAnimation.running) {
5959 if (revealProgress == 0) {
6060 indicators.state = "initial"
61− } else if (revealProgress <= hintValue && indicators.state == "reveal") {
61+ } else if (revealProgress <= hintValue) {
6262 indicators.state = "hint";
6363 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
6464 indicators.state = "reveal";
@@ -123,6 +123,8 @@ Showable {
123123 if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItem < 0 || indicatorRow.currentItem == null) {
124124 indicatorRow.currentItem = currentItem;
125125 }
126+ } else if (!currentItem) {
127+ indicatorRow.setDefaultItem();
126128 }
127129 }
128130
@@ -239,10 +241,7 @@ Showable {
239241 onRunningChanged: {
240242 if (hideAnimation.running) {
241243 indicators.state = "initial"
242− } else {
243− if (state == "initial") {
244− indicatorRow.setDefaultItem()
245− }
244+ indicatorRow.currentItem = null;
246245 }
247246 }
248247 }
@@ -264,18 +263,6 @@ Showable {
264263 }
265264 }
266265
267− // We start with pinned states. (default pinnedMode: true)
268− states: pinnedModeStates
269− // because of dynamic assignment of states, we need to assign state after completion.
270− Component.onCompleted: state = "initial"
271−
272− // changing states will reset state to "".
273− onPinnedModeChanged: {
274− var last_state = state;
275− states = (pinnedMode) ? pinnedModeStates : offScreenModeStates;
276− state = last_state;
277− }
278−
279266 property var dragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle
280267 DragHandle {
281268 id: showDragHandle
@@ -311,18 +298,27 @@ Showable {
311298 distanceThreshold: 0
312299 }
313300
314− property list<State> offScreenModeStates: [
301+ states: [
315302 State {
316303 name: "initial"
317304 },
318305 State {
319306 name: "hint"
320− PropertyChanges { target: indicatorRow; y: panelHeight }
307+ PropertyChanges {
308+ target: indicatorRow;
309+ y: pinnedMode ? 0 : panelHeight
310+ }
311+ StateChangeScript {
312+ script: {
313+ if (dragHandle) {
314+ calculateCurrentItem(dragHandle.touchX, false);
315+ }
316+ }
317+ }
321318 },
322319 State {
323320 name: "reveal"
324321 extend: "hint"
325− StateChangeScript { script: calculateCurrentItem(dragHandle.touchX, false); }
326322 },
327323 State {
328324 name: "locked"
@@ -333,25 +329,7 @@ Showable {
333329 extend: "hint"
334330 }
335331 ]
336−
337− property list<State> pinnedModeStates: [
338− State {
339− name: "initial"
340− },
341− State {
342− name: "hint"
343− },
344− State {
345− name: "reveal"
346− StateChangeScript { script: calculateCurrentItem(dragHandle.touchX, false); }
347− },
348− State {
349− name: "locked"
350− },
351− State {
352− name: "commit"
353− }
354− ]
332+ state: "initial"
355333
356334 transitions: [
357335 Transition {