mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
The real purpose these two callbacks serve is exactly what an ordinary parameter is perfect for: * Each has just one call site, at the top of the function. * They're not done for side effects; the point is what they return. * The function doesn't pass them any arguments of its own, or otherwise express any internal knowledge that doesn't just as properly belong to its caller. So, push the calls to these callbacks up into the function's caller, and pass in the data they return instead. This greatly simplifies the interface of `handle_text_input` and of `typing_status` in general.