|
|
@ -913,21 +913,7 @@ class ChatController extends GetxController { |
|
|
_refreshConversationList(); |
|
|
_refreshConversationList(); |
|
|
if(_isGiftMessage(message) && Get.currentRoute == '/ChatPage'){ |
|
|
if(_isGiftMessage(message) && Get.currentRoute == '/ChatPage'){ |
|
|
Get.log('message915: $message'); |
|
|
Get.log('message915: $message'); |
|
|
final giftInfo = _parseGiftInfo(message); |
|
|
|
|
|
var svgaFile = '', giftProductId = ''; |
|
|
|
|
|
if (giftInfo != null) { |
|
|
|
|
|
svgaFile = giftInfo['svgaFile']?.toString() ?? ''; |
|
|
|
|
|
giftProductId = giftInfo['giftProductId']?.toString() ?? ''; |
|
|
|
|
|
} |
|
|
|
|
|
if(svgaFile.isNotEmpty){ |
|
|
|
|
|
final svgaManager = SvgaPlayerManager.instance; |
|
|
|
|
|
svgaManager.addToQueue( |
|
|
|
|
|
SvgaAnimationItem( |
|
|
|
|
|
svgaFile: svgaFile, |
|
|
|
|
|
giftProductId: giftProductId, |
|
|
|
|
|
), |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
playSvga(message); |
|
|
} |
|
|
} |
|
|
if (Get.isLogEnable) { |
|
|
if (Get.isLogEnable) { |
|
|
Get.log('收到新消息并添加到列表: ${message.msgId}'); |
|
|
Get.log('收到新消息并添加到列表: ${message.msgId}'); |
|
|
@ -1184,6 +1170,24 @@ class ChatController extends GetxController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
playSvga(EMMessage message){ |
|
|
|
|
|
final giftInfo = _parseGiftInfo(message); |
|
|
|
|
|
var svgaFile = '', giftProductId = ''; |
|
|
|
|
|
if (giftInfo != null) { |
|
|
|
|
|
svgaFile = giftInfo['svgaFile']?.toString() ?? ''; |
|
|
|
|
|
giftProductId = giftInfo['giftProductId']?.toString() ?? ''; |
|
|
|
|
|
} |
|
|
|
|
|
if(svgaFile.isNotEmpty){ |
|
|
|
|
|
final svgaManager = SvgaPlayerManager.instance; |
|
|
|
|
|
svgaManager.addToQueue( |
|
|
|
|
|
SvgaAnimationItem( |
|
|
|
|
|
svgaFile: svgaFile, |
|
|
|
|
|
giftProductId: giftProductId, |
|
|
|
|
|
), |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// 重发消息 |
|
|
/// 重发消息 |
|
|
Future<bool> resendMessage(EMMessage failedMessage) async { |
|
|
Future<bool> resendMessage(EMMessage failedMessage) async { |
|
|
try { |
|
|
try { |
|
|
|