Play appearAnimation when recycling page
This commit is contained in:
parent
e947fe7695
commit
bed19eb117
@ -19,6 +19,7 @@ HLoader {
|
|||||||
|
|
||||||
readonly property alias appearAnimation: appearAnimation
|
readonly property alias appearAnimation: appearAnimation
|
||||||
|
|
||||||
|
signal recycled()
|
||||||
signal previousShown(string componentUrl, var properties)
|
signal previousShown(string componentUrl, var properties)
|
||||||
|
|
||||||
function showPage(componentUrl, properties={}) {
|
function showPage(componentUrl, properties={}) {
|
||||||
@ -33,6 +34,8 @@ HLoader {
|
|||||||
if (recycle) {
|
if (recycle) {
|
||||||
for (const [prop, value] of Object.entries(properties))
|
for (const [prop, value] of Object.entries(properties))
|
||||||
item[prop] = value
|
item[prop] = value
|
||||||
|
|
||||||
|
recycled()
|
||||||
} else {
|
} else {
|
||||||
pageLoader.setSource(componentUrl, properties)
|
pageLoader.setSource(componentUrl, properties)
|
||||||
window.uiState.page = componentUrl
|
window.uiState.page = componentUrl
|
||||||
@ -65,6 +68,7 @@ HLoader {
|
|||||||
clip: appearAnimation.running
|
clip: appearAnimation.running
|
||||||
|
|
||||||
onLoaded: { takeFocus(); appearAnimation.start() }
|
onLoaded: { takeFocus(); appearAnimation.start() }
|
||||||
|
onRecycled: appearAnimation.start()
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (! py.startupAnyAccountsSaved) {
|
if (! py.startupAnyAccountsSaved) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user