fix ui issues
This commit is contained in:
@@ -423,7 +423,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
}
|
||||
|
||||
void _onChanged(BuildContext context, String s) {
|
||||
StreamChannel.of(context).channel.keyStroke();
|
||||
StreamChannel.of(context).channel.keyStroke().catchError((e) {});
|
||||
|
||||
setState(() {
|
||||
_messageIsPresent = s.trim().isNotEmpty;
|
||||
@@ -1712,7 +1712,9 @@ class MessageInputState extends State<MessageInput> {
|
||||
|
||||
if (!kIsWeb) {
|
||||
_keyboardListener = KeyboardVisibility.onChange.listen((visible) {
|
||||
_onChanged(context, textEditingController.text);
|
||||
if (_focusNode.hasFocus) {
|
||||
_onChanged(context, textEditingController.text);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,11 @@ class UserAvatar extends StatelessWidget {
|
||||
this.onTap,
|
||||
this.showOnlineStatus = true,
|
||||
this.borderRadius,
|
||||
this.onlineIndicatorAlignment = Alignment.topRight,
|
||||
}) : super(key: key);
|
||||
|
||||
final User user;
|
||||
final Alignment onlineIndicatorAlignment;
|
||||
final BoxConstraints constraints;
|
||||
final BorderRadius borderRadius;
|
||||
final BoxConstraints onlineIndicatorConstraints;
|
||||
@@ -60,11 +62,11 @@ class UserAvatar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
if (showOnlineStatus && user.online == true)
|
||||
Positioned(
|
||||
top: 0,
|
||||
right: 0,
|
||||
child: Material(
|
||||
child: Center(
|
||||
Positioned.fill(
|
||||
child: Align(
|
||||
alignment: onlineIndicatorAlignment,
|
||||
child: Material(
|
||||
type: MaterialType.circle,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
constraints: onlineIndicatorConstraints ??
|
||||
@@ -77,9 +79,8 @@ class UserAvatar extends StatelessWidget {
|
||||
color: Color(0xff20E070),
|
||||
),
|
||||
),
|
||||
color: Colors.white,
|
||||
),
|
||||
shape: CircleBorder(),
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -80,7 +80,10 @@ class UserItem extends StatelessWidget {
|
||||
radius: 10,
|
||||
)
|
||||
: null,
|
||||
title: Text(user.name,style: TextStyle(fontWeight: FontWeight.bold),),
|
||||
title: Text(
|
||||
user.name,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
subtitle: showLastOnline ? _buildLastActive(context) : null,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user