mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-03 09:47:22 +03:00
improve Tasks Pages initialization
--when ParentView changes for PrimaryConfigView the Tasks model initialization should take place appropriately.
This commit is contained in:
parent
ac996f1721
commit
351512bbcc
@ -472,8 +472,14 @@ FocusScope {
|
||||
}
|
||||
}
|
||||
|
||||
onModelChanged: {
|
||||
if (latteView.extendedInterface.latteTasksModel.count === 0) {
|
||||
isReady = true;
|
||||
tasksRepeater.pages = 0;
|
||||
}
|
||||
}
|
||||
onPagesChanged: {
|
||||
if (pages === latteView.extendedInterface.latteTasksModel.count) {
|
||||
if (pages === latteView.extendedInterface.latteTasksModel.count && pages > 0) {
|
||||
//! Reparent TasksPages when all of them are loaded
|
||||
//! this way we avoid warnings from ::stackAfter
|
||||
for(var i=0; i<pages; ++i) {
|
||||
@ -484,6 +490,17 @@ FocusScope {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! initialize Tasks Repeater
|
||||
Connections {
|
||||
target: viewConfig
|
||||
onIsReadyChanged:{
|
||||
if (!viewConfig.isReady) {
|
||||
tasksRepeater.isReady = false;
|
||||
tasksRepeater.pages = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
Loading…
x
Reference in New Issue
Block a user