Adapt window management to chrome app window api
Appify tabs, windows, browserAction Port the extension.windows.focus function to new window api and generalize its error handling in the case where the requested window does not exist. An error will be passed to the callback. Port extension.browserAction and rename it to the more generic extension.onLaunched. Use of the id option when opening a window ensures that attempting to open a duplicate window merely focuses the existing window. Finally, after registration, close the options window and open the inbox. Port extension.remove
This commit is contained in:
@@ -80,10 +80,10 @@
|
||||
|
||||
var accountManager = new bg.textsecure.AccountManager();
|
||||
accountManager.registerSecondDevice(setProvisioningUrl, confirmNumber, incrementCounter).then(function() {
|
||||
$('.modal-container').hide();
|
||||
$('#init-setup').hide();
|
||||
$('#setup-complete').show().addClass('in');
|
||||
initOptions();
|
||||
extension.windows.getCurrent(function(appWindow) {
|
||||
bg.openInbox();
|
||||
extension.windows.remove(appWindow.id);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user