feat(app): chat sections are clear collapsible dividers; closed chats start collapsed

This commit is contained in:
2026-10-24 00:22:18 +01:00
parent d0b1c8e524
commit 1e55b8d2b3
16 changed files with 293 additions and 161 deletions
@@ -71,10 +71,7 @@ void main() {
group('arrival count', () {
test('counts only messages after the release point', () {
expect(
chatNewMessageCount(['m1', 'm2', 'm3'], 'm2'),
1,
);
expect(chatNewMessageCount(['m1', 'm2', 'm3'], 'm2'), 1);
expect(
chatNewMessageCount(['older', 'm1', 'm2', 'live', 'newer'], 'm2'),
2,
@@ -98,22 +95,13 @@ void main() {
group('restore', () {
test('no saved position lands on the newest end', () {
expect(
chatRestoreOffset(savedOffset: null, maxScrollExtent: 640),
640,
);
expect(chatRestoreOffset(savedOffset: null, maxScrollExtent: 640), 640);
});
test('a saved position is kept within the current extent', () {
expect(
chatRestoreOffset(savedOffset: 120, maxScrollExtent: 640),
120,
);
expect(chatRestoreOffset(savedOffset: 120, maxScrollExtent: 640), 120);
expect(chatRestoreOffset(savedOffset: 0, maxScrollExtent: 640), 0);
expect(
chatRestoreOffset(savedOffset: 900, maxScrollExtent: 640),
640,
);
expect(chatRestoreOffset(savedOffset: 900, maxScrollExtent: 640), 640);
});
});