Update tabs sample to match finalized API and link to website

This commit is contained in:
Logan Ramos
2022-05-27 14:46:59 -04:00
parent 1fedd4b932
commit 9f3373f057
6 changed files with 21 additions and 15709 deletions

View File

@ -17,11 +17,11 @@ export function activate(context: vscode.ExtensionContext) {
}));
context.subscriptions.push(vscode.window.tabGroups.onDidChangeTabs(tabChangeEvent => {
// If tabs are closed no longer track their activity
for (const removedTab of tabChangeEvent.removed) {
for (const removedTab of tabChangeEvent.closed) {
activityMap.delete(removedTab);
}
// Update activity map last active time on changed tabs
const changedTabs = [...tabChangeEvent.added, ...tabChangeEvent.changed];
const changedTabs = [...tabChangeEvent.opened, ...tabChangeEvent.changed];
for (const tab of changedTabs) {
// Reset the timer for the tabs last activity
activityMap.set(tab, Date.now());