Start restructuring how the account/room pane work
This commit is contained in:
@@ -5,5 +5,5 @@ import QtQuick 2.12
|
||||
Loader {
|
||||
id: loader
|
||||
asynchronous: true
|
||||
visible: status === Loader.Ready
|
||||
// visible: status === Loader.Ready
|
||||
}
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user