Only persist tab if its a channel or status tab
This commit is contained in:
parent
6624a97ce7
commit
3209238562
2 changed files with 21 additions and 21 deletions
File diff suppressed because one or more lines are too long
|
@ -5,11 +5,11 @@ import { observe } from 'util/observe';
|
||||||
|
|
||||||
const saveTab = debounce(tab =>
|
const saveTab = debounce(tab =>
|
||||||
Cookie.set('tab', tab.toString(), { expires: 30 })
|
Cookie.set('tab', tab.toString(), { expires: 30 })
|
||||||
, 3000);
|
, 1000);
|
||||||
|
|
||||||
export default function storage({ store }) {
|
export default function storage({ store }) {
|
||||||
observe(store, getSelectedTab, tab => {
|
observe(store, getSelectedTab, tab => {
|
||||||
if (tab.server) {
|
if (tab.isChannel() || (tab.server && !tab.name)) {
|
||||||
saveTab(tab);
|
saveTab(tab);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue