Commit 18a317b0791420de981bdecad64a92d93a49ccdd
1 parent
1feec80f
小米厂商通道问题修复;消息中心移除未处理订单消息同步移除消息弹框消息
Showing
7 changed files
with
13 additions
and
20 deletions
| @@ -57,11 +57,11 @@ android { | @@ -57,11 +57,11 @@ android { | ||
| 57 | JPUSH_APPKEY : "27ceb79c44af41ad99202f7a", // NOTE: JPush 上注册的包名对应的 Appkey. | 57 | JPUSH_APPKEY : "27ceb79c44af41ad99202f7a", // NOTE: JPush 上注册的包名对应的 Appkey. |
| 58 | JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可. | 58 | JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可. |
| 59 | HUAWEI_APPID:"101934783",//华为平台注册的appid | 59 | HUAWEI_APPID:"101934783",//华为平台注册的appid |
| 60 | - XIAOMI_APPKEY : "5811835841457", // 小米平台注册的appkey | ||
| 61 | - XIAOMI_APPID : "2882303761518358457", // 小米平台注册的appid | ||
| 62 | - OPPO_APPKEY : "94d77d10e7bb4c60bcf18a84c8ca8bdd", // OPPO平台注册的appkey | ||
| 63 | - OPPO_APPID : "30260281", // OPPO平台注册的appid | ||
| 64 | - OPPO_APPSECRET: "9b7e372f93794593953f93f118619570",//OPPO平台注册的appsecret | 60 | + XIAOMI_APPKEY : "MI-5811835841457", // 小米平台注册的appkey |
| 61 | + XIAOMI_APPID : "MI-2882303761518358457", // 小米平台注册的appid | ||
| 62 | + OPPO_APPKEY : "OP-94d77d10e7bb4c60bcf18a84c8ca8bdd", // OPPO平台注册的appkey | ||
| 63 | + OPPO_APPID : "OP-30260281", // OPPO平台注册的appid | ||
| 64 | + OPPO_APPSECRET: "OP-9b7e372f93794593953f93f118619570",//OPPO平台注册的appsecret | ||
| 65 | // VIVO_APPKEY : "5811835841457", // VIVO平台注册的appkey | 65 | // VIVO_APPKEY : "5811835841457", // VIVO平台注册的appkey |
| 66 | // VIVO_APPID : "2882303761518358457", // VIVO平台注册的appid | 66 | // VIVO_APPID : "2882303761518358457", // VIVO平台注册的appid |
| 67 | ] | 67 | ] |
| @@ -113,8 +113,8 @@ dependencies { | @@ -113,8 +113,8 @@ dependencies { | ||
| 113 | //小米推送 | 113 | //小米推送 |
| 114 | implementation 'cn.jiguang.sdk.plugin:xiaomi:3.5.8' | 114 | implementation 'cn.jiguang.sdk.plugin:xiaomi:3.5.8' |
| 115 | 115 | ||
| 116 | -// //OPPO推送 | ||
| 117 | -// implementation 'cn.jiguang.sdk.plugin:oppo:3.5.8' | 116 | + //OPPO推送 |
| 117 | + implementation 'cn.jiguang.sdk.plugin:oppo:3.5.8' | ||
| 118 | // | 118 | // |
| 119 | // //vivo推送 | 119 | // //vivo推送 |
| 120 | // implementation 'cn.jiguang.sdk.plugin:vivo:3.5.8' | 120 | // implementation 'cn.jiguang.sdk.plugin:vivo:3.5.8' |
| 1 | package com.naji.one_key | 1 | package com.naji.one_key |
| 2 | 2 | ||
| 3 | -import android.os.Bundle | ||
| 4 | -import android.os.PersistableBundle | ||
| 5 | -import android.util.Log | ||
| 6 | import androidx.annotation.NonNull; | 3 | import androidx.annotation.NonNull; |
| 7 | import io.flutter.embedding.android.FlutterActivity | 4 | import io.flutter.embedding.android.FlutterActivity |
| 8 | import io.flutter.embedding.engine.FlutterEngine | 5 | import io.flutter.embedding.engine.FlutterEngine |
| @@ -10,11 +7,6 @@ import io.flutter.plugins.GeneratedPluginRegistrant | @@ -10,11 +7,6 @@ import io.flutter.plugins.GeneratedPluginRegistrant | ||
| 10 | 7 | ||
| 11 | class MainActivity: FlutterActivity() { | 8 | class MainActivity: FlutterActivity() { |
| 12 | 9 | ||
| 13 | - override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { | ||
| 14 | - super.onCreate(savedInstanceState, persistentState) | ||
| 15 | - Log.d("Push-Data",this.intent.data.toString()); | ||
| 16 | - } | ||
| 17 | - | ||
| 18 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { | 10 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { |
| 19 | GeneratedPluginRegistrant.registerWith(flutterEngine); | 11 | GeneratedPluginRegistrant.registerWith(flutterEngine); |
| 20 | } | 12 | } |
| @@ -103,7 +103,6 @@ class HomePageState extends State<HomePage>{ | @@ -103,7 +103,6 @@ class HomePageState extends State<HomePage>{ | ||
| 103 | LogUtil.v("flutter get registration id : $rid"); | 103 | LogUtil.v("flutter get registration id : $rid"); |
| 104 | userTokenInit(rid); | 104 | userTokenInit(rid); |
| 105 | }); | 105 | }); |
| 106 | - jpush.openSettingsForNotification(); | ||
| 107 | jpush.isNotificationEnabled().then((bool value) { | 106 | jpush.isNotificationEnabled().then((bool value) { |
| 108 | if (!value) { | 107 | if (!value) { |
| 109 | //没有打开通知 | 108 | //没有打开通知 |
| @@ -94,7 +94,7 @@ class MessageDialogItem extends StatelessWidget { | @@ -94,7 +94,7 @@ class MessageDialogItem extends StatelessWidget { | ||
| 94 | content: "立即处理", | 94 | content: "立即处理", |
| 95 | state: 1, | 95 | state: 1, |
| 96 | onPress: () { | 96 | onPress: () { |
| 97 | - messageDialogModel.removeMessage(message); | 97 | + messageDialogModel.removeMessage(message.id); |
| 98 | NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id,replace: messageDialogModel.messages.isEmpty); | 98 | NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id,replace: messageDialogModel.messages.isEmpty); |
| 99 | }, | 99 | }, |
| 100 | ), | 100 | ), |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | import 'package:flutter_easyrefresh/easy_refresh.dart'; | 2 | import 'package:flutter_easyrefresh/easy_refresh.dart'; |
| 3 | +import 'package:one_key/provider/message_dialog_model.dart'; | ||
| 3 | import 'package:one_key/provider/message_model.dart'; | 4 | import 'package:one_key/provider/message_model.dart'; |
| 4 | import 'package:one_key/provider/user_model.dart'; | 5 | import 'package:one_key/provider/user_model.dart'; |
| 5 | import 'package:provider/provider.dart'; | 6 | import 'package:provider/provider.dart'; |
| @@ -25,6 +26,8 @@ class MessageLeftPageState extends State<MessageLeftPage> { | @@ -25,6 +26,8 @@ class MessageLeftPageState extends State<MessageLeftPage> { | ||
| 25 | bus.on("remove_untreated_message",(args){ | 26 | bus.on("remove_untreated_message",(args){ |
| 26 | MessageModel messageModel=Provider.of<MessageModel>(context,listen: false); | 27 | MessageModel messageModel=Provider.of<MessageModel>(context,listen: false); |
| 27 | messageModel.removeUntreatedMessageByMid(args.toString()); | 28 | messageModel.removeUntreatedMessageByMid(args.toString()); |
| 29 | + MessageDialogModel messageDialogModel=Provider.of<MessageDialogModel>(context,listen: false); | ||
| 30 | + messageDialogModel.removeMessage(args.toString()); | ||
| 28 | }); | 31 | }); |
| 29 | _controller=EasyRefreshController(); | 32 | _controller=EasyRefreshController(); |
| 30 | WidgetsBinding.instance.addPostFrameCallback((_){ | 33 | WidgetsBinding.instance.addPostFrameCallback((_){ |
| @@ -6,7 +6,6 @@ import 'package:one_key/provider/notebook_model.dart'; | @@ -6,7 +6,6 @@ import 'package:one_key/provider/notebook_model.dart'; | ||
| 6 | import 'package:one_key/provider/user_model.dart'; | 6 | import 'package:one_key/provider/user_model.dart'; |
| 7 | import 'package:one_key/res/colors.dart'; | 7 | import 'package:one_key/res/colors.dart'; |
| 8 | import 'package:one_key/utils/dialog_util.dart'; | 8 | import 'package:one_key/utils/dialog_util.dart'; |
| 9 | -import 'package:one_key/utils/log_util.dart'; | ||
| 10 | import 'package:one_key/utils/utils.dart'; | 9 | import 'package:one_key/utils/utils.dart'; |
| 11 | import 'package:one_key/widgets/MyDivider.dart'; | 10 | import 'package:one_key/widgets/MyDivider.dart'; |
| 12 | import 'package:one_key/widgets/app_bar.dart'; | 11 | import 'package:one_key/widgets/app_bar.dart'; |
| @@ -39,8 +39,8 @@ class MessageDialogModel extends ChangeNotifier{ | @@ -39,8 +39,8 @@ class MessageDialogModel extends ChangeNotifier{ | ||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | //添加一条信息 | 41 | //添加一条信息 |
| 42 | - removeMessage(Message message){ | ||
| 43 | - messages.remove(message); | 42 | + removeMessage(String mid){ |
| 43 | + messages.removeWhere((message)=>message.id==mid); | ||
| 44 | notifyListeners(); | 44 | notifyListeners(); |
| 45 | } | 45 | } |
| 46 | 46 |
-
Please register or login to post a comment