Support setting typing status
Follow-up to and stacked on top of #888
Switched to a different implementation for the compose box updates.
LGTM, but how about also calling stoppedComposing at/near the top of the _send helper? I think we already send "typing stopped" notices when the send button is tapped, but kind of incidentally, because we clear the content input—
widget.contentController.clear();
—and our content-input listener responds to that by calling stoppedComposing. I think an explicit stoppedComposing call would be helpful, especially because we have a TODO for delaying the clear-input action:
widget.contentController.clear();
try {
// TODO(#720) clear content input only on success response;
// while waiting, put input(s) and send button into a disabled
// "working on it" state (letting input text be selected for copying).
and we want to send the notice as soon as it applies, i.e., as soon as the send button is tapped.
(As a consequence, I guess we'll end up making a redundant stoppedComposing call, but that should be harmless.)
Marking for Greg's review. Thanks for the revision!
edit: ah, one nit I almost forgot about: I see that final TypingNotifier typingNotifier; was reordered in this revision, but the other places where typingNotifier appears in PerAccountStore should also be reordered correspondingly, like in the PerAccountStore._ constructor.
edit edit: And the PR description and one of the commits should get a Fixes: line. 🙂
Thanks for the review! I wasn't clear about the status of the PR because I didn't post a comment after the pushes yesterday. Just worked on some improvements and addressed the new feedback!
Updated the PR. Thanks for the review!
Thanks. I restored the simpler synchronous API (while returning the futures in private helpers instead of unawaited'ing them) and left a comment on the async.elapse discussion. Should be ready for review again!
This hasn't addressed everything yet. I will push another update later today. The current revision shows the general approach to tracking other types of composing activities.
I think the later changes for sending typing notices for scrolling list of autocompletion items and interacting with compose buttons might be better done in a separate PR that fixes the issue, as this thread has become longer.
Sounds good! I agree a follow-up PR is good for those.
Created #1033 as a follow-up, and left the app lifecycle change here with the main implementation. Thanks for the review! This is ready now.
Thanks for the review! I have updated the PR addressing the comments. Note that I mentioned a minor issue in this discussion on composing and _focusChanged, which is not resolved in this update; my current plan is to do so in a follow-up PR.
Thanks for the review! Updated the PR.
Thanks! Looks good; merging.