Fixed Selective Open not working properly when multiple windows are in session.
This commit is contained in:
		| @@ -4,8 +4,8 @@ Easy Session Manager allows you to manage your Firefox session by backing up or | ||||
| # Download | ||||
| https://addons.mozilla.org/en-US/firefox/addon/easy-session-manager/ | ||||
|  | ||||
| # Version: 0.2.3.0 | ||||
| * Changed menu gutter positioning | ||||
| # Version: 0.2.3.2 | ||||
| * Fixed Selective Open not working properly when multiple windows are in session. | ||||
|  | ||||
|  | ||||
| # Images | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| { | ||||
|   "manifest_version": 2, | ||||
|   "name": "Easy Session Manager", | ||||
|   "version": "0.2.3.1", | ||||
|   "version": "0.2.3.2", | ||||
|   "description": "Easy Session Manager allows you to manage your Firefox session by backing up or loading your saved sessions.", | ||||
|  | ||||
|   "browser_specific_settings": { | ||||
|   | ||||
| @@ -201,6 +201,7 @@ const setKeyData = (_keys, _keysLength) => { | ||||
|  | ||||
| const startLoadSession = () => { | ||||
|     sessionData = getSelectionData(container, keys, keysLength); | ||||
|  | ||||
|     keysLength  = Object.keys(sessionData).length; | ||||
|     if (keysLength > 0) { | ||||
|         loadSession(sessionData, replaceTabs.checked); | ||||
| @@ -214,6 +215,7 @@ const startLoadSession = () => { | ||||
| const loadSession = (json = null, replaceTabs = false) => { | ||||
|     let keys       = Object.keys(json); | ||||
|     let keysLength = Object.keys(json).length; | ||||
|  | ||||
|     try { | ||||
|         windowApi.getAll().then(windows => { | ||||
|             windowApi.getCurrent({populate: true}).then(currentWindow => { | ||||
| @@ -250,13 +252,13 @@ const loadSession = (json = null, replaceTabs = false) => { | ||||
|  | ||||
|                     // If more than one window, load tabs to new windows. | ||||
|                     if (keysLength > 1) { | ||||
|                         windowMaker(1, keysLength, keys, json) | ||||
|                         windowMaker(1, keysLength, keys, json); | ||||
|                     } | ||||
|                 } else { // Load into new windows... | ||||
|                     if (keysLength == 1) { | ||||
|                         windowMaker(0, keysLength, keys, json) | ||||
|                     } else if (keysLength == 0) { | ||||
|                     if (keysLength == 0) { | ||||
|                         messageWindow("error", "Canceled operation; no tabs in session..."); | ||||
|                     } else if (keysLength > 0) { | ||||
|                         windowMaker(0, keysLength, keys, json); | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user