Skip to content

Commit

Permalink
Fix missing Activities when enabled after Arc-Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesg99 committed Jul 14, 2020
1 parent 9b8d402 commit cc75702
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ var dtpPanel = Utils.defineClass({
let parent = container.get_parent();

container._dtpOriginalParent = parent;
parent.remove_child(container);
parent ? parent.remove_child(container) : null;
this.panel.actor.add_child(container);
});
}
Expand Down Expand Up @@ -465,9 +465,10 @@ var dtpPanel = Utils.defineClass({
if (!Main.sessionMode.isLocked) {
[['activities', 0], ['aggregateMenu', -1], ['dateMenu', 0]].forEach(b => {
let container = this.statusArea[b[0]].container;
let originalParent = container._dtpOriginalParent;

this.panel.actor.remove_child(container);
container._dtpOriginalParent.insert_child_at_index(container, b[1]);
originalParent ? originalParent.insert_child_at_index(container, b[1]) : null;
delete container._dtpOriginalParent;
});

Expand Down

0 comments on commit cc75702

Please sign in to comment.