Skip to content

Commit

Permalink
Remove prune empty tab group code (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
briangonzalez authored May 2, 2017
1 parent ed72c7c commit a787132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
9 changes: 2 additions & 7 deletions app/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ const store = new Vuex.Store({
commit('SET_THEME', items.theme || 'light');
commit('SET_BOOKMARK_FOLDER_ID', items.bookmarkFolderId);
},

async PRUNE_EMPTY_TAB_GROUPS ({ commit }) {
await BookmarkManager.pruneEmptyTabGroups();
},
},

mutations: {
Expand Down Expand Up @@ -139,11 +135,10 @@ const store = new Vuex.Store({

});

const hydrateAndPrune = async () => {
await store.dispatch('PRUNE_EMPTY_TAB_GROUPS');
const hydrate = async () => {
await store.dispatch('HYDRATE_STATE');
}
hydrateAndPrune();
hydrate();

const bindListeners = async () => {
const currentTab = await chromep.tabs.getCurrent()
Expand Down
13 changes: 0 additions & 13 deletions lib/bookmark-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,6 @@ export default {
});
},

async pruneEmptyTabGroups () {
/*
REMOVE IN VERSION 2.6.0
*/
const tabGroups = await this.tabGroupsFromBookmarks();

for (let tabGroup of tabGroups) {
if (!tabGroup.tabs.length) {
await this.removeTabGroup(tabGroup.dateAdded);
}
}
},

newId () {
return new Date().getTime().toString();
},
Expand Down

0 comments on commit a787132

Please sign in to comment.