mirror of
https://github.com/standardnotes/app.git
synced 2026-01-16 23:01:30 +00:00
tmp: disable legacy note history
This commit is contained in:
parent
5c3bf43346
commit
bc45de813d
1 changed files with 0 additions and 56 deletions
|
|
@ -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 }) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue