This commit is contained in:
abu 2025-09-03 11:56:14 +08:00
parent 7c5d51157a
commit 01be7fdd12
4 changed files with 17 additions and 16 deletions

View File

@ -123,7 +123,7 @@ class PushService {
/// ///
static void _handleNotificationClick(String ext, {String? userID, String? groupID}) async { static void _handleNotificationClick(String ext, {String? userID, String? groupID}) async {
try { try {
// ext={id:ID,type:'newFoucs',userID:idgroupIDID} // ext={id:ID,type:'newFocus',userID:idgroupIDID}
// final ext = jsonEncode({ // final ext = jsonEncode({
// "userID": "123456", // "userID": "123456",
// "groupID": "654321", // "groupID": "654321",

View File

@ -2,7 +2,7 @@
enum ConversationType { enum ConversationType {
noFriend, // noFriend, //
system, // system, //
newFoucs, // newFocus, //
interaction, // interaction, //
order, // order, //
groupNotify, // groupNotify, //
@ -12,7 +12,7 @@ enum ConversationType {
class ConversationTypeStatic { class ConversationTypeStatic {
static const String noFriend = 'noFriend'; static const String noFriend = 'noFriend';
static const String system = 'system'; static const String system = 'system';
static const String newFoucs = 'newFoucs'; static const String newFocus = 'newFocus';
static const String interaction = 'interaction'; static const String interaction = 'interaction';
static const String order = 'order'; static const String order = 'order';
static const String groupNotify = 'groupNotify'; static const String groupNotify = 'groupNotify';
@ -25,8 +25,8 @@ extension ConversationTypeExtension on ConversationType {
return 'noFriend'; return 'noFriend';
case ConversationType.system: case ConversationType.system:
return 'system'; return 'system';
case ConversationType.newFoucs: case ConversationType.newFocus:
return 'newFoucs'; return 'newFocus';
case ConversationType.interaction: case ConversationType.interaction:
return 'interaction'; return 'interaction';
case ConversationType.order: case ConversationType.order:
@ -44,8 +44,8 @@ conversationTypeFromString(String? type) {
return ConversationType.noFriend.name; return ConversationType.noFriend.name;
} else if (type.contains('system')) { } else if (type.contains('system')) {
return ConversationType.system.name; return ConversationType.system.name;
} else if (type.contains('newFoucs')) { } else if (type.contains('newFocus')) {
return ConversationType.newFoucs.name; return ConversationType.newFocus.name;
} else if (type.contains('interaction')) { } else if (type.contains('interaction')) {
return ConversationType.interaction.name; return ConversationType.interaction.name;
} else if (type.contains('order')) { } else if (type.contains('order')) {

View File

@ -1,6 +1,6 @@
/// ///
enum NotifyMessageType { enum NotifyMessageType {
newFoucs, // newFocus, //
systemNotify, // -> systemNotify, // ->
systemReport, // -> systemReport, // ->
systemCheck, // -> systemCheck, // ->
@ -20,7 +20,7 @@ enum NotifyMessageType {
/// ///
class NotifyMessageTypeConstants { class NotifyMessageTypeConstants {
static const String newFoucs = 'newFoucs'; static const String newFocus = 'newFocus';
static const String systemNotify = 'systemNotify'; static const String systemNotify = 'systemNotify';
static const String systemReport = 'systemReport'; static const String systemReport = 'systemReport';
static const String systemCheck = 'systemCheck'; static const String systemCheck = 'systemCheck';
@ -41,8 +41,8 @@ class NotifyMessageTypeConstants {
extension NotifyMessageTypeExtension on NotifyMessageType { extension NotifyMessageTypeExtension on NotifyMessageType {
String get name { String get name {
switch (this) { switch (this) {
case NotifyMessageType.newFoucs: case NotifyMessageType.newFocus:
return 'newFoucs'; return 'newFocus';
case NotifyMessageType.systemNotify: case NotifyMessageType.systemNotify:
return 'systemNotify'; return 'systemNotify';
case NotifyMessageType.systemReport: case NotifyMessageType.systemReport:
@ -79,8 +79,8 @@ extension NotifyMessageTypeExtension on NotifyMessageType {
notifyMessageTypeFromString(String? type) { notifyMessageTypeFromString(String? type) {
switch (type) { switch (type) {
case 'newFoucs': case 'newFocus':
return NotifyMessageType.newFoucs.name; return NotifyMessageType.newFocus.name;
case 'systemNotify': case 'systemNotify':
return NotifyMessageType.systemNotify.name; return NotifyMessageType.systemNotify.name;
case 'systemReport': case 'systemReport':

View File

@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:loopin/IM/im_service.dart';
import 'package:loopin/models/notify_message.type.dart'; import 'package:loopin/models/notify_message.type.dart';
import 'package:loopin/models/summary_type.dart'; import 'package:loopin/models/summary_type.dart';
import 'package:tencent_cloud_chat_sdk/enum/message_elem_type.dart'; import 'package:tencent_cloud_chat_sdk/enum/message_elem_type.dart';
@ -32,7 +33,7 @@ String parseMessageSummary(V2TimMessage msg) {
} }
} }
// newFoucs, // // newFocus, //
// systemNotify, // -> // systemNotify, // ->
// systemReport, // -> // systemReport, // ->
// systemCheck, // -> // systemCheck, // ->
@ -52,7 +53,7 @@ String _parseCustomMessage(V2TimMessage? msg) {
if (msg == null) return '[null]'; if (msg == null) return '[null]';
final sum = msg.cloudCustomData; final sum = msg.cloudCustomData;
final elment = msg.customElem; // final elment = msg.customElem; //
// logger.w('解析自定义消息:${msg.toJson()}'); logger.w('解析自定义消息:$sum,自定义属性:${msg.cloudCustomData}');
// logger.w('解析element${elment?.desc ?? 'summary_error'}'); // logger.w('解析element${elment?.desc ?? 'summary_error'}');
try { try {
switch (sum) { switch (sum) {
@ -67,7 +68,7 @@ String _parseCustomMessage(V2TimMessage? msg) {
/// [des] /// [des]
/// [data] json数据 /// [data] json数据
/// firstFrameImgcoverfirstFrameImg /// firstFrameImgcoverfirstFrameImg
case NotifyMessageTypeConstants.newFoucs: case NotifyMessageTypeConstants.newFocus:
// //
///[userID], ///[userID],