Commit 92d3c6e0 authored by Daniel Garcia Moreno's avatar Daniel Garcia Moreno Committed by Florian Müllner

appDisplay: Don't iterate over all pages in page manager

In getAppPosition it's not needed to continue looking for an app in the
page manager if the app is found in a page.

This patch breaks the search loop just after the first ocurrence is

parent 386d25e6
Pipeline #214118 passed with stages
in 5 minutes and 1 second
......@@ -851,11 +851,11 @@ var PageManager = GObject.registerClass({
for (let pageIndex = 0; pageIndex < this._pages.length; pageIndex++) {
const pageData = this._pages[pageIndex];
if (!(appId in pageData))
page = pageIndex;
position = pageData[appId].position;
if (appId in pageData) {
page = pageIndex;
position = pageData[appId].position;
return [page, position];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment