feat: Upgrade to 2.5.1+5
This commit is contained in:
parent
68dc760e32
commit
31ec784982
|
|
@ -197,7 +197,7 @@ class TUIChatGlobalModel extends ChangeNotifier implements TIMUIKitClass {
|
||||||
|
|
||||||
clearCurrentConversation() {
|
clearCurrentConversation() {
|
||||||
// Only keep the last 20 messages when existing a chat.
|
// Only keep the last 20 messages when existing a chat.
|
||||||
_messageListMap[currentSelectedConv] = (_messageListMap[currentSelectedConv] ?? []).sublist(max(0, ((_messageListMap[currentSelectedConv] ?? []).length - 10)));
|
_messageListMap[currentSelectedConv] = (_messageListMap[currentSelectedConv] ?? []).sublist(0, min(10, ((_messageListMap[currentSelectedConv] ?? []).length - 1)));
|
||||||
if (_currentConversationList.isNotEmpty) {
|
if (_currentConversationList.isNotEmpty) {
|
||||||
_currentConversationList.removeLast();
|
_currentConversationList.removeLast();
|
||||||
}
|
}
|
||||||
|
|
@ -539,8 +539,7 @@ class TUIChatGlobalModel extends ChangeNotifier implements TIMUIKitClass {
|
||||||
}
|
}
|
||||||
_receivedNewMessageCount = 0;
|
_receivedNewMessageCount = 0;
|
||||||
final tempCurrentMsgList = _messageListMap[convID] ?? [];
|
final tempCurrentMsgList = _messageListMap[convID] ?? [];
|
||||||
final currentMsg = tempCurrentMsgList..sublist(max(0, (tempCurrentMsgList.length - 30)));
|
_messageListMap[convID] = [newMsg, ...tempCurrentMsgList];
|
||||||
_messageListMap[convID] = [newMsg, ...currentMsg];
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
final messageID = newMsg.msgID;
|
final messageID = newMsg.msgID;
|
||||||
final needReadReceipt = newMsg.needReadReceipt ?? false;
|
final needReadReceipt = newMsg.needReadReceipt ?? false;
|
||||||
|
|
@ -561,8 +560,7 @@ class TUIChatGlobalModel extends ChangeNotifier implements TIMUIKitClass {
|
||||||
}
|
}
|
||||||
} else if (convID != null) {
|
} else if (convID != null) {
|
||||||
final tempCurrentMsgList = _messageListMap[convID] ?? [];
|
final tempCurrentMsgList = _messageListMap[convID] ?? [];
|
||||||
final currentMsg = tempCurrentMsgList..sublist(max(0, (tempCurrentMsgList.length - 20)));
|
_messageListMap[convID] = [newMsg, ...tempCurrentMsgList];
|
||||||
_messageListMap[convID] = [newMsg, ...currentMsg];
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ class CoreServicesImpl implements CoreServices {
|
||||||
onKickedOffline: listener.onKickedOffline,
|
onKickedOffline: listener.onKickedOffline,
|
||||||
onUserStatusChanged: (List<V2TimUserStatus> userStatusList) {
|
onUserStatusChanged: (List<V2TimUserStatus> userStatusList) {
|
||||||
updateUserStatusList(userStatusList);
|
updateUserStatusList(userStatusList);
|
||||||
|
listener.onUserStatusChanged(userStatusList);
|
||||||
},
|
},
|
||||||
onSelfInfoUpdated: (V2TimUserFullInfo info) {
|
onSelfInfoUpdated: (V2TimUserFullInfo info) {
|
||||||
listener.onSelfInfoUpdated(info);
|
listener.onSelfInfoUpdated(info);
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ class _TUIChatState extends TIMUIKitState<TIMUIKitChat> {
|
||||||
axis: Axis.vertical,
|
axis: Axis.vertical,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget? joinInGroupCallWidget;
|
Widget? _joinInGroupCallWidget;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -352,8 +352,13 @@ class _TUIChatState extends TIMUIKitState<TIMUIKitChat> {
|
||||||
if (_getConvType() != ConvType.group) {
|
if (_getConvType() != ConvType.group) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
joinInGroupCallWidget = await TUICore.instance.raiseExtension(TUIExtensionID.joinInGroup, {GROUP_ID: widget.conversationID!});
|
final w = await TUICore.instance.raiseExtension(TUIExtensionID.joinInGroup, {GROUP_ID: widget.conversationID!});
|
||||||
setState(() {});
|
if(w != _joinInGroupCallWidget){
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_joinInGroupCallWidget = w;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -461,7 +466,7 @@ class _TUIChatState extends TIMUIKitState<TIMUIKitChat> {
|
||||||
if (widget.customAppBar != null) widget.customAppBar!,
|
if (widget.customAppBar != null) widget.customAppBar!,
|
||||||
if (filteredApplicationList.isNotEmpty) _renderJoinGroupApplication(filteredApplicationList.length, theme),
|
if (filteredApplicationList.isNotEmpty) _renderJoinGroupApplication(filteredApplicationList.length, theme),
|
||||||
if (widget.topFixWidget != null) widget.topFixWidget!,
|
if (widget.topFixWidget != null) widget.topFixWidget!,
|
||||||
if (joinInGroupCallWidget != null) Center(child: joinInGroupCallWidget!),
|
if (_joinInGroupCallWidget != null) Center(child: _joinInGroupCallWidget!),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: theme.chatBgColor,
|
color: theme.chatBgColor,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: tencent_cloud_chat_uikit
|
name: tencent_cloud_chat_uikit
|
||||||
description: A powerful chat UI component library and business logic for Tencent Cloud Chat, creating seamless in-app chat modules for delightful user experiences.
|
description: A powerful chat UI component library and business logic for Tencent Cloud Chat, creating seamless in-app chat modules for delightful user experiences.
|
||||||
version: 2.5.1+4
|
version: 2.5.1+5
|
||||||
homepage: https://trtc.io/products/chat?utm_source=gfs&utm_medium=link&utm_campaign=%E6%B8%A0%E9%81%93&_channel_track_key=k6WgfCKn
|
homepage: https://trtc.io/products/chat?utm_source=gfs&utm_medium=link&utm_campaign=%E6%B8%A0%E9%81%93&_channel_track_key=k6WgfCKn
|
||||||
repository: https://github.com/TencentCloud/chat-uikit-flutter
|
repository: https://github.com/TencentCloud/chat-uikit-flutter
|
||||||
documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html
|
documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue