refactor(tvos): publish menu passthrough directly, trim untuned remote-touch knobs
TvosMenuPolicyPublisher batched an idempotent fire-and-forget publish behind a transaction-depth counter that could never exceed one across its three non-nesting call sites — the call sites now publish directly and the pure predicate keeps its test coverage. AppleTvRemoteTouchService exposed 14 injectable knobs of which only six are exercised anywhere (verified per knob); the other eight are private constants or internal construction now.
This commit is contained in:
@@ -69,30 +69,8 @@ void main() {
|
||||
expect(shouldPass(isOverlaySheetOpen: true), isFalse);
|
||||
expect(shouldPass(isRouteCurrent: false), isFalse);
|
||||
expect(shouldPass(isAppleTV: false), isFalse);
|
||||
});
|
||||
|
||||
test('tvOS Menu policy transaction publishes only the settled navigation state', () {
|
||||
var desired = false;
|
||||
final published = <bool>[];
|
||||
final publisher = TvosMenuPolicyPublisher(() => desired, published.add);
|
||||
|
||||
publisher.run(() {
|
||||
desired = true;
|
||||
publisher.update();
|
||||
desired = false;
|
||||
});
|
||||
|
||||
expect(published, [false]);
|
||||
});
|
||||
|
||||
test('tvOS Menu policy publishes retained sidebar Home state immediately', () {
|
||||
final desired = true;
|
||||
final published = <bool>[];
|
||||
final publisher = TvosMenuPolicyPublisher(() => desired, published.add);
|
||||
|
||||
publisher.update();
|
||||
|
||||
expect(published, [true]);
|
||||
expect(shouldPass(isShowingProfileSelection: true), isFalse);
|
||||
expect(shouldPass(hasVisibleTabs: false), isFalse);
|
||||
});
|
||||
|
||||
test('desktop physical Escape is reserved for window fullscreen only at root Home', () {
|
||||
|
||||
Reference in New Issue
Block a user