🐛 Bug fixes and optimization

This commit is contained in:
LittleSheep 2024-08-23 23:16:41 +08:00
parent a70e6c7118
commit 14e8f7b775
4 changed files with 6 additions and 8 deletions

View File

@ -149,7 +149,7 @@ class WebSocketProvider extends GetxController {
'device_token': token,
'device_id': deviceUuid,
});
if (resp.statusCode != 200) {
if (resp.statusCode != 200 && resp.statusCode != 400) {
throw RequestException(resp);
}
}

View File

@ -104,8 +104,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
setState(() => _isBusy = false);
}
List<ChannelMember> _typingUsers = List.empty(growable: true);
Map<int, Timer> _typingInactiveTimer = {};
final List<ChannelMember> _typingUsers = List.empty(growable: true);
final Map<int, Timer> _typingInactiveTimer = {};
void _listenMessages() {
final WebSocketProvider ws = Get.find();
@ -133,6 +133,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
case 'status.typing':
if (event.payload?['channel_id'] != _channel!.id) break;
final member = ChannelMember.fromJson(event.payload!['member']);
if (member.id == _channelProfile!.id) break;
if (!_typingUsers.any((x) => x.id == member.id)) {
setState(() {
_typingUsers.add(member);

View File

@ -197,10 +197,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
} else if (SolianTheme.isLargeScreen(context)) {
_collapseDrawer();
} else {
_drawerAnimationController.animateTo(
1,
duration: const Duration(milliseconds: 100),
);
_drawerAnimationController.value = 1;
}
}

View File

@ -2,7 +2,7 @@ name: solian
description: "The Solar Network App"
publish_to: "none"
version: 1.2.1+22
version: 1.2.1+23
environment:
sdk: ">=3.3.4 <4.0.0"