Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appDisplay: Handle an error moving nonexistent app icons #754

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion js/ui/appDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,11 @@ var BaseAppView = GObject.registerClass({
if (addedApps.includes(icon))
this._addItem(icon, page, position);
else if (page !== -1 && position !== -1)
this._moveItem(icon, page, position);
try {
this._moveItem(icon, page, position);
} catch (error) {
log(`Error moving app icon: ${error.message}`);
}
Comment on lines +1105 to +1109
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure this will suppress the error but it doesn't seem like the right way to handle this. If you have two apps in your app grid layout, and one becomes an alias for the other, the old name should be removed from the layout, I think.

});

this.emit('view-loaded');
Expand Down