forked from Foxyz/sync_replay_project
Restructure step 2: Status as one computed level, the Notifier's real policy, system notifications
- Status: computed from connection, presence, hold, relay, player facts; no setters (health writes and HealthStatus gone); pill, strip and source line read it; transitions go to the Notifier. - Notifier: noticeFor(event, context) with self presence, alone, window activity, playing and prefs; toasts for joins/leaves/returns/swaps/ Up next adds (with picture)/problems/chat, the rest logged; while sitting out only chat, nudges, starting, Up next (+ joins if chosen); alone no social notices; replayed lines logged; owns its toast timer. - System notifications (flutter_local_notifications: D-Bus on Linux, WinRT on Windows) when the window isn't focused; a click focuses it. - Toasts sit above the control bar and move with it. - Versions: each member's in the members card and avatar tooltip, the server's in the card header; the strip no longer shows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
130c934b9b
commit
629be0d9ed
41 files changed
+2114
-741
No files matched your search
@@ -80,9 +80,11 @@ void main() {
|
||||
|
||||
test('health parse: online, junk and protocol mismatch', () {
|
||||
final ok = ServerHealth.parse(jsonEncode(
|
||||
{'ok': true, 'name': 'Den', 'proto': RelayConstants.protoVersion, 'viewers': 2}));
|
||||
{'ok': true, 'name': 'Den', 'proto': RelayConstants.protoVersion, 'viewers': 2, 'version': '1.3.0'}));
|
||||
expect(ok.online, isTrue);
|
||||
expect(ok.name, 'Den');
|
||||
expect(ok.version, '1.3.0');
|
||||
expect(ServerHealth.parse('{"ok":true}').version, '', reason: 'a server too old to say');
|
||||
expect(ok.viewers, 2);
|
||||
expect(ok.needsUpdate, isFalse);
|
||||
expect(ServerHealth.parse('{"ok":true,"proto":-1}').needsUpdate, isTrue);
|
||||
|
||||
Reference in new issue
Block a user