|
@@ -22,9 +22,11 @@ setMessageCount();
|
|
|
|
|
|
// 消息通讯
|
|
// 消息通讯
|
|
chrome.runtime.onConnect.addListener(function (port) {
|
|
chrome.runtime.onConnect.addListener(function (port) {
|
|
- if (port.name === "popup") {
|
|
|
|
|
|
+
|
|
|
|
+ if (port.name === "popup" || port.name === "popup_transactions") {
|
|
|
|
+ let msgType = port.name === "popup" ? 1 : 2;
|
|
port.onDisconnect.addListener(function() {
|
|
port.onDisconnect.addListener(function() {
|
|
- readTaskAllMsg(() => {
|
|
|
|
|
|
+ readTaskAllMsg({msgType},() => {
|
|
getMessageInfo();
|
|
getMessageInfo();
|
|
})
|
|
})
|
|
});
|
|
});
|