Skip to content

Typing indicator: continuous dot animation, safe visibility fallback, layout branch by controller - #271

Open
byaletheya-sudo wants to merge 1 commit into
OpenBubbles:rustpushfrom
byaletheya-sudo:fix/typing-indicator-animation
Open

byaletheya-sudo wants to merge 1 commit into
OpenBubbles:rustpushfrom
byaletheya-sudo:fix/typing-indicator-animation

Conversation

@byaletheya-sudo

@byaletheya-sudo byaletheya-sudo commented Sep 17, 2026

Copy link
Copy Markdown

Four small defects in typing_indicator.dart, all visible from the code:

  • Periodic hitch. The dots looped by listening for AnimationStatus.completed and calling forward(from: 0.0) from the status callback, which stops and restarts the Ticker; the first tick after a restart reports zero elapsed time, so every dot froze for one frame every 700 ms. AnimationController.repeat() runs the identical 0..pi tween on one continuous ticker, and the status listener (which could call forward() on a controller being torn down) goes away.
  • Null assertion. (widget.controller?.showTypingIndicatorFor.isNotEmpty ?? widget.visible)! throws if a caller passes neither argument; now ?? false.
  • Wrong layout branch in tablet mode. The branch tested iOS || cm.activeChat == null, but the only call sites without a controller are the chat-list tiles, and activeChat is non-null whenever a chat is open in the other pane. On a wide screen the tiles took the Material branch, where participants is an empty list, and drew an empty avatar group beside the dots. Branching on widget.controller == null is the intended distinction.
  • Icon overflow. The app-icon container in the ClipPath branch had no height while its Material sibling has height: 25; with 10/20 padding in a 50 px row, an undecorated Image.memory overflowed. Set to 20. AnimatedSize is anchored to the leading edge so the dots no longer slide sideways while it resizes.

Verification. One file. Built as a release APK (arm64) from this branch and installed on a Galaxy Z Fold 8; the app runs. I could not observe a live typing indicator in a sideloaded build (registration needs the hosted service), so the fixes are argued from the code above; the periodic hitch is reproducible by reasoning about Ticker restart and should be visible in any 1:1 chat while the other side types. flutter analyze reports no new diagnostics against rustpush.

🤖 Generated with Claude Code

… layout branch by controller

- The dots looped by listening for AnimationStatus.completed and calling
  forward(from: 0.0) from the status callback, which stops and restarts the Ticker; the
  first tick after a restart reports zero elapsed time, so every dot froze for a frame
  every 700 ms. AnimationController.repeat() runs the same 0..pi tween on one ticker.
- (widget.controller?.showTypingIndicatorFor.isNotEmpty ?? widget.visible)! threw when
  neither argument was given; now falls back to false.
- The layout branch tested iOS || cm.activeChat == null, but the only callers without a
  controller are the chat-list tiles, and activeChat is non-null whenever a chat is open
  in the other pane (tablet mode), so tiles drew an empty avatar group next to the
  dots. Branch on widget.controller == null, which is the intended distinction.
- The app-icon container in the ClipPath branch had no height and overflowed the
  50 px row; set to 20 like its sibling. AnimatedSize is anchored to the leading edge so
  the dots do not slide sideways while it resizes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant