tmp: disable legacy note history

This commit is contained in:
Mo 2022-02-17 08:29:10 -06:00
parent 5c3bf43346
commit bc45de813d
No known key found for this signature in database
GPG key ID: 034B13B1644297E1

View file

@ -68,62 +68,6 @@ export const HistoryListContainer: FunctionComponent<Props> = observer(
RevisionListTabType.Remote
);
useEffect(() => {
const fetchLegacyHistory = async () => {
const actionExtensions = application.actionsManager.getExtensions();
actionExtensions.forEach(async (ext) => {
const actionExtension =
await application.actionsManager.loadExtensionInContextOfItem(
ext,
note
);
if (!actionExtension) {
return;
}
const isLegacyNoteHistoryExt = actionExtension?.actions.some(
(action) => action.verb === ActionVerb.Nested
);
if (!isLegacyNoteHistoryExt) {
return;
}
const legacyHistory = [] as LegacyHistoryEntry[];
setIsFetchingLegacyHistory(true);
await Promise.all(
actionExtension?.actions.map(async (action) => {
if (!action.subactions?.[0]) {
return;
}
const response = await application.actionsManager.runAction(
action.subactions[0],
note
);
if (!response) {
return;
}
legacyHistory.push(response.item as LegacyHistoryEntry);
})
);
setIsFetchingLegacyHistory(false);
setLegacyHistory(
sortRevisionListIntoGroups<LegacyHistoryEntry>(legacyHistory)
);
});
};
fetchLegacyHistory();
}, [application.actionsManager, note]);
const TabButton: FunctionComponent<{
type: RevisionListTabType;
}> = ({ type }) => {