Fix regression that prevents showing the last selected tab on startup
Fixes #2723
This commit is contained in:
parent
b02ad0dc83
commit
44ef4cd35a
1 changed files with 17 additions and 6 deletions
|
@ -128,12 +128,23 @@ var Zotero_Tabs = new function () {
|
|||
}
|
||||
else if (tab.type === 'reader') {
|
||||
if (Zotero.Items.exists(tab.data.itemID)) {
|
||||
this.add({
|
||||
type: 'reader-unloaded',
|
||||
title: tab.title,
|
||||
index: i,
|
||||
data: tab.data
|
||||
});
|
||||
if (tab.selected) {
|
||||
Zotero.Reader.open(tab.data.itemID,
|
||||
null,
|
||||
{
|
||||
title: tab.title,
|
||||
openInBackground: !tab.selected
|
||||
}
|
||||
);
|
||||
}
|
||||
else {
|
||||
this.add({
|
||||
type: 'reader-unloaded',
|
||||
title: tab.title,
|
||||
index: i,
|
||||
data: tab.data
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue