Skip to content

Commit

Permalink
Added file path to recently opened files incase both of the file have…
Browse files Browse the repository at this point in the history
… the same names.

Fix: Removed repeated addition of already open file to recently opened file.
  • Loading branch information
John4650-hub committed Sep 16, 2023
1 parent 90d5e2d commit 7a1c36a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 6 additions & 3 deletions www/js/components/main_FileEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,16 @@ export async function onDeviceReady() {
workWithFile(url)
window.aceEditor.session.setMode(`ace/mode/${ext}`)
})
document.querySelectorAll('#recent_file li p').forEach((i) => {
if (i.innerText == url) {

let recents = document.querySelectorAll('#recent_file li p')
for (let i = 0; i < recents.length; i++) {
if (recents[i].innerText == url) {
//do nothing
} else {
recentFilesTab.appendChild(openedFile)
}
})

}
}
}, () => { console.log('failed to load file system'); });
}
11 changes: 6 additions & 5 deletions www/js/components/tabs/changeLog.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
let log = [{
version: 'v 4.0.7',
info: `Added new paste in textarea,
support for new language,
Added about section`
info: `Added new paste in textarea,
support for new language,
Added about section`
}, {
version: 'v5.0.0',
info: `Added tab for recently edited files
implemented saving of setting
info: `Added tab for recently edited files
implemented saving of setting
`
},{version:'v5.0.1',info: `✅UI cleanUp
✅Added Comments
`},{version:'v5.0.1 (Bug fix)',info: `✅Bug fix
`}
]

Expand Down

0 comments on commit 7a1c36a

Please sign in to comment.