wenliming 3 роки тому
батько
коміт
36c945ea03
1 змінених файлів з 23 додано та 16 видалено
  1. 23 16
      src/logic/content/twitter.js

+ 23 - 16
src/logic/content/twitter.js

@@ -1302,23 +1302,10 @@ export const showTwitterPost = (data) => {
     contentGetNftPostPre({
         groupId: data.groupId
     })
-    let groupTab = getGroupTabNode();
-    if (groupTab) {
-        let line = groupTab.querySelector('#de-tab-line');
-        if(line) {
-            let {display} = line.style;
-            if(display != 'none') {
-                groupTab.click();
-            }
-        }
-    } else {
-        setTimeout(() => {
-            addGroupTab();
-        }, 2000)
-    }
-    clearInterval(fixProfileTabAutoTimer);
-    fixProfileTabAutoSwitch();
+    
     // addPublishTipsIframe({ type: 'nft' })
+
+    setGroupTabStatus();
 }
 
 export function publishNFTTweetEvent({ groupId, postId, srcContent }) {
@@ -2101,6 +2088,26 @@ const getGroupTabContentNode = () => {
     return content;
 }
 
+const setGroupTabStatus = () => {
+    let groupTab = getGroupTabNode();
+    if (groupTab) {
+        let line = groupTab.querySelector('#de-tab-line');
+        if(line) {
+            let {display} = line.style;
+            if(display != 'none') {
+                groupTab.click();
+            }
+        }
+    } else {
+        setTimeout(() => {
+            addGroupTab();
+        }, 2000)
+    }
+    
+    clearInterval(fixProfileTabAutoTimer);
+    fixProfileTabAutoSwitch();
+};
+
 const fixProfileTabAutoSwitch = () => {
     fixProfileTabAutoTimer = setInterval(() => {
         let groupTab = getGroupTabNode();