Start restructuring how the account/room pane work

This commit is contained in:
miruka
2020-04-26 14:20:45 -04:00
parent da6a54f0bf
commit 72c96b3ba5
13 changed files with 290 additions and 692 deletions

View File

@@ -5,5 +5,5 @@ import QtQuick 2.12
Loader {
id: loader
asynchronous: true
visible: status === Loader.Ready
// visible: status === Loader.Ready
}

View File

@@ -12,8 +12,17 @@ SwipeView {
saveEnabled = true
}
onCurrentIndexChanged: if (saveEnabled) window.saveState(this)
onCurrentIndexChanged: {
if (saveEnabled) window.saveState(this)
if (currentIndex < previousIndex) lastMove = HSwipeView.Move.ToPrevious
if (currentIndex > previousIndex) lastMove = HSwipeView.Move.ToNext
previousIndex = currentIndex
}
enum Move { ToPrevious, ToNext }
property string saveName: ""
property var saveId: "ALL"
@@ -22,7 +31,9 @@ SwipeView {
// Prevent onCurrentIndexChanged from running before Component.onCompleted
property bool saveEnabled: false
property int previousIndex: 0
property int defaultIndex: 0
property int lastMove: HSwipeView.Move.ToNext
property bool changed: currentIndex !== defaultIndex