App-MatrixClient
view release on metacpan or search on metacpan
lib/App/MatrixClient/RoomTab.pm view on Meta::CPAN
my $last_member = pop @members;
$s->append_tagged( format_displayname( $_ ) )
->append( ", " ) for @members;
$s->append_tagged( format_displayname( $last_member ) );
$self->set_typing_line( $s );
},
);
$room->add_child( $self->{typing_grace_timer} = IO::Async::Timer::Countdown->new(
delay => TYPING_GRACE_SECONDS,
on_expire => sub { $room->typing_stop },
) );
}
sub append_line
{
my $self = shift;
if( $self->{typing_line} ) {
lib/App/MatrixClient/RoomTab.pm view on Meta::CPAN
# No timestamp
local $self->{timestamp_format};
$self->SUPER::append_line( $self->{typing_line} = $line ) if $line;
}
sub still_typing
{
my $self = shift;
my $timer = $self->{typing_grace_timer};
if( $timer->is_running ) {
$timer->reset;
}
else {
$self->{room}->typing_start;
$timer->start;
}
}
sub update_headline
{
my $self = shift;
my $room = $self->{room};
$self->{headline}->set_text( $room->topic // "" );
}
( run in 1.042 second using v1.01-cache-2.11-cpan-49f99fa48dc )