1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-04 01:47:31 +03:00

fix,consider only launchers for inCurrentActivity

This commit is contained in:
Michail Vourlakos 2021-02-16 09:51:13 +02:00
parent c922aec8a5
commit 7811e4830b

View File

@ -97,7 +97,7 @@ Item {
}
function hasLauncher(url) {
return _launchers.tasksModel.launcherPosition(url) != -1;
return _launchers.tasksModel.launcherPosition(url) >= 0;
}
function addLauncher(launcherUrl) {
@ -209,6 +209,10 @@ Item {
}
function inCurrentActivity(launcherUrl) {
if (!hasLauncher(launcherUrl)) {
return false;
}
var activities = _launchers.tasksModel.launcherActivities(launcherUrl);
if (activities.length ===0