Skip to content

Commit

Permalink
[bugfix] UI refresh when selected session is deleted - auto-select cu…
Browse files Browse the repository at this point in the history
…rrent browsing session
  • Loading branch information
ReDEnergy committed Apr 26, 2018
1 parent 4bba1da commit 9ee4339
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/scripts/components/session-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ define(function(require, exports) {
this.scrollToSelected();
}.bind(this));

GlobalEvents.on('BookmarkDeleted', function (itemID) {
if (AppConfig.get('session.selected') == itemID) {
WindowEvents.emit(this.document, 'ShowCurrentSession');
}
}.bind(this));

SessionFolderEvents(document, list, this);

// ------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions data/scripts/components/session-sync-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ define(function(require, exports) {

AppConfig.set('undo.events', undoEvents);
GlobalEvents.emit('TrashCan-Items', undoEvents.length);
GlobalEvents.emit('BookmarkDeleted', bookmarkID);

// Trigger reordering
WindowEvents.broadcast('BookmarksPositionChanged', indices);
Expand Down

0 comments on commit 9ee4339

Please sign in to comment.