Skip to content

Commit

Permalink
resending typing status every 2 seconds if you keep typing
Browse files Browse the repository at this point in the history
  • Loading branch information
naxuroqa committed Jun 16, 2014
1 parent eadba68 commit 0688823
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/MessageTextView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,16 @@ namespace Venom {
is_typing_timeout_fn_running = false;
return false;
}
Timer continuous_typing_timeout = new Timer();
private void on_buffer_changed() {
is_typing_timer.start();
if(placeholder_visible || buffer.text._chug() == "") {
if(is_typing) {
is_typing = false;
typing_status(is_typing);
}
} else if(!is_typing) {
} else if(!is_typing || continuous_typing_timeout.elapsed() > 2) {
continuous_typing_timeout.start();
is_typing = true;
typing_status(is_typing);
if(!is_typing_timeout_fn_running) {
Expand Down

0 comments on commit 0688823

Please sign in to comment.