Skip to content

Commit bb35677

Browse files
committed
feat: enhance auto-update functionality with version and OS logging
1 parent 9fcf8d1 commit bb35677

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/main/java/com/laker/postman/panel/collections/right/request/RequestEditSubPanel.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import cn.hutool.json.JSONUtil;
66
import com.laker.postman.common.SingletonFactory;
77
import com.laker.postman.common.setting.SettingManager;
8-
import com.laker.postman.panel.collections.right.request.sub.EasyHttpHeadersPanel;
9-
import com.laker.postman.panel.collections.right.request.sub.EasyParamsTablePanel;
108
import com.laker.postman.common.table.map.EasyTablePanel;
119
import com.laker.postman.model.*;
1210
import com.laker.postman.panel.collections.right.RequestEditPanel;
@@ -380,13 +378,7 @@ protected void done() {
380378
JOptionPane.YES_NO_OPTION,
381379
JOptionPane.QUESTION_MESSAGE);
382380
if (result == JOptionPane.YES_OPTION) {
383-
// 检查 header 区域是否已存在 Accept: text/event-stream(忽略大小写)
384-
boolean hasSseAccept = headersPanel.getMap().keySet().stream()
385-
.anyMatch(k -> k != null && k.equalsIgnoreCase(ACCEPT) &&
386-
TEXT_EVENT_STREAM.equalsIgnoreCase(headersPanel.getMap().get(k)));
387-
if (!hasSseAccept) {
388-
headersPanel.addRow(ACCEPT, TEXT_EVENT_STREAM);
389-
}
381+
headersPanel.setOrUpdateHeader(ACCEPT, TEXT_EVENT_STREAM);
390382
reqTabs.setSelectedComponent(headersPanel);
391383
// 定位到headerpanel table的最后一行
392384
headersPanel.scrollRectToVisible();

0 commit comments

Comments
 (0)