on xenial help sign in
Truth is hard
92d0b1aTed Gould
plugins/Unity/Launcher/backend/launcherbackend.cpp+6−4
@@ -164,7 +164,7 @@ int LauncherBackend::count(const QString &appId) const
164 int count = -1;
164 int count = -1;
165 LauncherBackendItem *item = getItem(appId);
165 LauncherBackendItem *item = getItem(appId);
166
166
167− if (!item) {
167+ if (item) {
168 if (item->countVisible) {
168 if (item->countVisible) {
169 count = item->count;
169 count = item->count;
170 }
170 }
@@ -178,7 +178,7 @@ void LauncherBackend::setCount(const QString &appId, int count) const
178 LauncherBackendItem *item = getItem(appId);
178 LauncherBackendItem *item = getItem(appId);
179
179
180 bool emitchange = false;
180 bool emitchange = false;
181− if (!item) {
181+ if (item) {
182 emitchange = (item->count != count);
182 emitchange = (item->count != count);
183 item->count = count;
183 item->count = count;
184 }
184 }
@@ -198,7 +198,7 @@ bool LauncherBackend::countVisible(const QString &appId) const
198 bool visible = false;
198 bool visible = false;
199 LauncherBackendItem *item = getItem(appId);
199 LauncherBackendItem *item = getItem(appId);
200
200
201− if (!item) {
201+ if (item) {
202 visible = item->countVisible;
202 visible = item->countVisible;
203 }
203 }
204
204
@@ -210,9 +210,11 @@ void LauncherBackend::setCountVisible(const QString &appId, bool visible) const
210 LauncherBackendItem *item = getItem(appId);
210 LauncherBackendItem *item = getItem(appId);
211
211
212 bool emitchange = false;
212 bool emitchange = false;
213− if (!item) {
213+ if (item) {
214 emitchange = (item->countVisible != visible);
214 emitchange = (item->countVisible != visible);
215 item->countVisible = visible;
215 item->countVisible = visible;
216+ } else {
217+ qDebug() << "Unable to find:" << appId;
216 }
218 }
217
219
218 if (emitchange) {
220 if (emitchange) {