Remebering last team fix to old version.
This commit is contained in:
Родитель
4ccf8b8dd6
Коммит
2c50f892c0
|
@ -2,7 +2,7 @@
|
|||
"manifestVersion": 1,
|
||||
"id": "team-calendar",
|
||||
"publisher": "ms-devlabs",
|
||||
"version": "2.0.14",
|
||||
"version": "2.0.22",
|
||||
"name": "Team Calendar",
|
||||
"description": "Track events important to your team, view and manage days off, quickly see when sprints start and end, and more.",
|
||||
"public": true,
|
||||
|
|
|
@ -149,17 +149,17 @@ export class CalendarStateManagerComponent extends BaseComponent<
|
|||
const navSvc = await VSS.getService<IHostNavigationService>(VSS.ServiceIds.Navigation);
|
||||
let selectedTeamId = (await navSvc.getCurrentState()).team;
|
||||
if (!selectedTeamId) {
|
||||
// Nothing in URL - check context
|
||||
// Nothing in URL - check data service
|
||||
const dataSvc = await VSS.getService<IExtensionDataService>(VSS.ServiceIds.ExtensionData);
|
||||
selectedTeamId = await dataSvc.getValue<string>("selected-team-" + VSS.getWebContext().project.id, { scopeType: "User" });
|
||||
}
|
||||
if (!selectedTeamId) {
|
||||
// Nothing in URL or data service - check context
|
||||
const contextTeam = VSS.getWebContext().team;
|
||||
if (contextTeam && contextTeam.id) {
|
||||
selectedTeamId = contextTeam.id;
|
||||
}
|
||||
}
|
||||
if (!selectedTeamId) {
|
||||
// Nothing in URL or context - check data service
|
||||
const dataSvc = await VSS.getService<IExtensionDataService>(VSS.ServiceIds.ExtensionData);
|
||||
selectedTeamId = await dataSvc.getValue<string>("selected-team", { scopeType: "User" });
|
||||
}
|
||||
if (selectedTeamId) {
|
||||
// get the team if we found a way to choose one
|
||||
const team = await Tfs_Core_WebApi.getClient().getTeam(VSS.getWebContext().project.id, selectedTeamId);
|
||||
|
@ -180,7 +180,7 @@ export class CalendarStateManagerComponent extends BaseComponent<
|
|||
navSvc.updateHistoryEntry(null, { team: selectedTeam.id }, true, true, null, false);
|
||||
|
||||
const dataSvc = await VSS.getService<IExtensionDataService>(VSS.ServiceIds.ExtensionData);
|
||||
dataSvc.setValue<string>("selected-team", selectedTeam.id, { scopeType: "User" });
|
||||
dataSvc.setValue<string>("selected-team-" + VSS.getWebContext().project.id, selectedTeam.id, { scopeType: "User" });
|
||||
|
||||
this.setState({ selectedTeam });
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче