Only persist tab if its a channel or status tab

This commit is contained in:
Ken-Håvard Lieng 2017-06-29 07:06:05 +02:00
parent 6624a97ce7
commit 3209238562
2 changed files with 21 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,11 +5,11 @@ import { observe } from 'util/observe';
const saveTab = debounce(tab =>
Cookie.set('tab', tab.toString(), { expires: 30 })
, 3000);
, 1000);
export default function storage({ store }) {
observe(store, getSelectedTab, tab => {
if (tab.server) {
if (tab.isChannel() || (tab.server && !tab.name)) {
saveTab(tab);
}
});