Skip to content

Commit

Permalink
Updated the automatic file opening
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Rapious committed Jun 23, 2022
1 parent de668b1 commit d04f3af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<body>

<div class="title-bar">
<span class="document-name unselectable" id="documentName"> No file opened yet </span>
<span class="document-name unselectable" id="documentName"> Elements LaTeX </span>
<img class="unselectable" id="simplifiedLogoImage" src="../assets/ui/simplified_logo.png" alt="Simplified Elements Logo">
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ window.addEventListener("DOMContentLoaded", () => {
// Initially disable the text area
el.fileTextarea.firstChild.disabled = true;

const handleDocumentChange = (filePath, content = "") => {
const handleDocumentChange = (filePath, content) => {
/* On document change, updates the side file structure tree, text area and line count */

texDocumentPath = filePath;
Expand Down Expand Up @@ -143,7 +143,7 @@ window.addEventListener("DOMContentLoaded", () => {

// Opens a non-specific TeX file
const randomTexFile = getTexFileInFolder(openedFolderPath)
if (randomTexFile != "") handleDocumentChange(randomTexFile);
if (randomTexFile != "") ipcRenderer.send("open-given-file", randomTexFile);

el.folderTree.innerHTML = "<ul>\n" + htmlCode + "\n<ul/>";
};
Expand Down

0 comments on commit d04f3af

Please sign in to comment.