typing_status: Fold stop into main method update.

It'd already been the case for some while that calling `stop` had the
same effect as calling `update` (previously `handle_text_input`) with
a falsy recipient.  With the API changes in the previous few commits,
this becomes quite natural to make explicit in the API.
This commit is contained in:
Greg Price
2019-10-21 17:44:14 -07:00
parent e639b0a6f8
commit a191890213
4 changed files with 3 additions and 19 deletions

View File

@@ -130,12 +130,3 @@ export function update(worker, new_recipient) {
actually_ping_server(worker, new_recipient, current_time);
start_or_extend_idle_timer(worker);
}
export function stop(worker) {
// We get this if somebody closes the compose box, but
// it doesn't necessarily mean we had typing indicators
// active before this.
if (state.current_recipient) {
stop_last_notification(worker);
}
}