2022-12-05 03:05:18 +08:00
|
|
|
module.exports = () => {
|
|
|
|
const cls = require("../../src/services/cls");
|
|
|
|
const cloningService = require("../../src/services/cloning");
|
|
|
|
const beccaLoader = require("../../src/becca/becca_loader");
|
|
|
|
const becca = require("../../src/becca/becca");
|
|
|
|
|
|
|
|
cls.init(() => {
|
|
|
|
beccaLoader.load();
|
|
|
|
|
|
|
|
for (const attr of becca.findAttributes('label','bookmarked')) {
|
2022-12-24 19:26:32 +08:00
|
|
|
cloningService.toggleNoteInParent(true, attr.noteId, '_lbBookmarks');
|
2022-12-05 03:05:18 +08:00
|
|
|
|
|
|
|
attr.markAsDeleted("0204__migrate_bookmarks_to_clones");
|
|
|
|
}
|
2023-01-13 15:43:18 +08:00
|
|
|
|
|
|
|
// bookmarkFolder used to work in 0.57 without the bookmarked label
|
|
|
|
for (const attr of becca.findAttributes('label','bookmarkFolder')) {
|
|
|
|
cloningService.toggleNoteInParent(true, attr.noteId, '_lbBookmarks');
|
|
|
|
}
|
2022-12-05 03:05:18 +08:00
|
|
|
});
|
|
|
|
};
|