Skip to content

Commit

Permalink
fixed issue of updating view based on file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
saharmehrpour committed Jun 26, 2024
1 parent 2074f8e commit 4df9415
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/core/webSocketManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class WebSocketManager extends Component {
let tagTable = [];
let ws = new WebSocket("ws://localhost:8887");
let projectPath = "";
let counter = 3;

this.props.onUpdateWS(ws);

Expand Down Expand Up @@ -171,15 +170,11 @@ class WebSocketManager extends Component {
case webSocketReceiveMessage.file_change_in_ide_msg:
// data: "filePath"
let focusedFilePath = message.data;
if (!this.props.ignoreFileChange) {
if (this.props.ignoreFileChange) {
this.props.onFalsifyIgnoreFile();
} else {
this.props.onFilePathChange(focusedFilePath);
window.location.hash = `#/${hashConst.rulesForFile}/` + focusedFilePath.replace(/\//g, "%2F");
} else {
counter--;
if (counter === 0) {
this.props.onFalsifyIgnoreFile();
counter = 3;
}
}
break;

Expand Down

0 comments on commit 4df9415

Please sign in to comment.