fixed stale state after logout and replayed or lost share intents

This commit is contained in:
2026-09-24 21:43:21 +02:00
parent e4e2b1a4fb
commit 498d195138
32 changed files with 743 additions and 188 deletions
+13
View File
@@ -62,5 +62,18 @@ void main() {
test('empty shares compare equal', () {
expect(_share().contentEquals(_share()), isTrue);
});
test('relocated share still equals its raw delivery', () {
final raw = _share(filePaths: ['/cache/a.jpg']);
final claimed = PendingShare(
filePaths: ['/cache/share_intent/1/a.jpg'],
text: null,
receivedAt: DateTime(2026, 1, 1),
sourcePaths: raw.filePaths,
);
expect(claimed.contentEquals(raw), isTrue);
expect(raw.contentEquals(claimed), isTrue);
});
});
}