Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prune empty tab group code #69

Merged
merged 1 commit into from
May 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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