Skip to content

Commit

Permalink
Ensure we send the typing indicator as soon as you type and once ever…
Browse files Browse the repository at this point in the history
…y 1 second afterwards as long as you are typing
  • Loading branch information
iwiznia committed Mar 20, 2024
1 parent 2b99e8a commit 942537b
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,16 @@ const isIOSNative = getPlatform() === CONST.PLATFORM.IOS;
/**
* Broadcast that the user is typing. Debounced to limit how often we publish client events.
*/
const debouncedBroadcastUserIsTyping = lodashDebounce((reportID: string) => {
Report.broadcastUserIsTyping(reportID);
}, 100);
const debouncedBroadcastUserIsTyping = lodashDebounce(
(reportID: string) => {
Report.broadcastUserIsTyping(reportID);
},
1000,
{
maxWait: 1000,
leading: true,
},
);

const willBlurTextInputOnTapOutside = willBlurTextInputOnTapOutsideFunc();

Expand Down

0 comments on commit 942537b

Please sign in to comment.