Update: Handle the Dropbox client better

The Dropbox client appends its PID to the id, which gets used for the
application name in `handleAppIndicatorKStatusNotifierItemItem`. This
resulted in the creation of a new entry for the Dropbox client on
basically every Dropbox client start, which would fill up the extensions
settings and would also result in the user effectively not being able to
set the position for the Dropbox client permanently.
This commit fixes these issues by removing the PID (and the hypen before
it) for the Dropbox client application name.
This commit is contained in:
Julian 2021-07-05 10:58:10 +02:00
parent 03fb3355b4
commit 10b491c252
Signed by: julian
GPG Key ID: 094C2AC34192FA11

View File

@ -53,7 +53,11 @@ var AppIndicatorKStatusNotifierItemManager = class AppIndicatorKStatusNotifierIt
handleAppIndicatorKStatusNotifierItemItem(indicatorContainer, role, boxOrder, boxOrders, atToBeginning = false) {
// Get the application the AppIndicator/KStatusNotifierItem is
// associated with.
const application = indicatorContainer.get_child()._indicator.id;
let application = indicatorContainer.get_child()._indicator.id;
// Since the Dropbox client appends its PID to the id, drop the PID and
// the hyphen before it.
if (application.startsWith("dropbox-client-")) application = "dropbox-client";
// Associate the role with the application.
let roles = this._applicationRoleMap.get(application);