feat(app): clean up also offers empty journals, except today's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-26 06:32:56 +01:00
1 parent a8559fd467
commit 7c898f4fcd
6 files changed
+35 -7

No files matched your search

+1 -1
View File
@@ -100,7 +100,7 @@ abstract class SynapseGraph implements RustOpaqueInterface {
/// Pages worth cleaning up: leftovers of Logseq (its built-ins and pages with
/// `type:: system`) and empty pages (no text in any block, not a hub, no type, tags or
/// description). Of the Logseq ones only the organisational files (`contents`, `card`,
/// description), journals included except today's. Of the Logseq ones only the organisational files (`contents`, `card`,
/// `favorites`, `hls__*`) and empty pages are preselected, and never a hub: a built-in
/// title such as `todo` may hold real content. Empty pages are all preselected.
Future<List<LegacyCandidate>> legacyCandidates();
+1 -1
View File
@@ -5292,7 +5292,7 @@ class SynapseGraphImpl extends RustOpaque implements SynapseGraph {
/// Pages worth cleaning up: leftovers of Logseq (its built-ins and pages with
/// `type:: system`) and empty pages (no text in any block, not a hub, no type, tags or
/// description). Of the Logseq ones only the organisational files (`contents`, `card`,
/// description), journals included except today's. Of the Logseq ones only the organisational files (`contents`, `card`,
/// `favorites`, `hls__*`) and empty pages are preselected, and never a hub: a built-in
/// title such as `todo` may hold real content. Empty pages are all preselected.
Future<List<LegacyCandidate>> legacyCandidates() => RustLib.instance.api
+7 -1
View File
@@ -76,7 +76,13 @@ class _AllPagesViewState extends State<AllPagesView> {
);
if (removed == null || removed.isEmpty) return;
await app.queue.run(() => app.backend.purgePages(removed));
app.recent.removeWhere((p) => removed.contains(p.id));
app.pagesDeleted(
removed,
titles: [
for (final c in candidates)
if (removed.contains(c.id)) c.title,
],
);
app.reload();
}