1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-12 01:17:55 +03:00

validate moving synced launchers properly

--this way when a separator is added it is also
added and synced properly to relevant applets
This commit is contained in:
Michail Vourlakos 2021-01-13 23:07:53 +02:00
parent 230b8d8ba7
commit ecbe3841f1
3 changed files with 18 additions and 11 deletions

View File

@ -371,7 +371,10 @@ Item {
Timer {
id: delayedLaynchersSyncTimer
interval: 450
onTriggered: tasksModel.syncLaunchers();
onTriggered: {
tasksModel.syncLaunchers();
_launchers.validateSyncedLaunchersOrder();
}
}

View File

@ -180,10 +180,16 @@ Item {
}
}
function validateLaunchersOrder(orderedLaunchers) {
validator.stop();
validator.launchers = orderedLaunchers;
validator.start();
function validateSyncedLaunchersOrder() {
if (bridge && !_launchers.inUniqueGroup()) {
bridge.launchers.validateSyncedLaunchersOrder(syncer.clientId,
group,
currentShownLauncherList());
} else {
/*validator.stop();
validator.launchers = orderedLaunchers;
validator.start();*/
}
}
function inCurrentActivity(launcherUrl) {
@ -322,11 +328,7 @@ Item {
}
if (inDraggingPhase) {
if (_launchers.bridge && !_launchers.inUniqueGroup()) {
_launchers.bridge.launchers.validateSyncedLaunchersOrder(_launchers.syncer.clientId,
_launchers.group,
_launchers.currentShownLauncherList());
}
_launchers.validateSyncedLaunchersOrder();
}
} else {
plasmoid.configuration.launchers59 = _launchers.tasksModel.launcherList;

View File

@ -113,7 +113,9 @@ Item {
function validateSyncedLaunchersOrder(group, orderedLaunchers) {
if (group === _launchers.group && !isBlocked) {
_launchers.validateLaunchersOrder(orderedLaunchers);
validator.stop();
validator.launchers = orderedLaunchers;
validator.start();
}
}