Skip to content

Commit f2abeb7

Browse files
committed
优化ipfs api调用
1 parent 71655ca commit f2abeb7

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/main/java/UI/panel/im/IMPanel.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ public class IMPanel extends NBSAbstractPanel {
4747
* 左侧IM peers
4848
*/
4949
private ImLeftPanel leftPanel;
50+
/**
51+
* 右侧聊天面板
52+
*/
53+
private ChatPanel chatPanel;
5054

5155

5256
private static JTextArea imMSGShow = new JTextArea();
5357
/**
5458
* 顶部显示
5559
*/
56-
private static ToolbarStatsPanel toolbarStatsPanel = new ToolbarStatsPanel(PKUI_PANEL_IM_LABEL);;
60+
private static ToolbarStatsPanel toolbarStatsPanel = new ToolbarStatsPanel(PKUI_PANEL_IM_LABEL);
5761

5862
private static JTextArea inputArea = new JTextArea();
5963

@@ -124,7 +128,7 @@ private JPanel getCenterPanel(){
124128
* 聊天主窗口
125129
*/
126130
//centerPanel.add(buildMessMainPanel(),BorderLayout.CENTER);
127-
ChatPanel chatPanel = new ChatPanel(this);
131+
chatPanel = new ChatPanel(this);
128132
centerPanel.add(chatPanel,BorderLayout.CENTER);
129133
return centerPanel;
130134
}
@@ -134,6 +138,9 @@ public void load() {
134138

135139
}
136140

141+
/**
142+
*
143+
*/
137144
@Override
138145
protected void addListener() {
139146
sendButton.addActionListener(new AbstractAction() {

src/main/java/com/nbs/ui/panels/ContactsPanel.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,12 @@ public boolean checkContactsAndUpdate(PeerBoradcastInfo peerInfo,String from){
313313
}
314314
return changed;
315315
}
316+
317+
public void setLogger(Logger logger) {
318+
this.logger = logger;
319+
}
320+
321+
public static ContactsPanel getContext() {
322+
return context;
323+
}
316324
}

0 commit comments

Comments
 (0)