Skip to content

Commit

Permalink
fix: show Files after import on windows
Browse files Browse the repository at this point in the history
this aims to fix issue from
#1815
  • Loading branch information
lidel committed Jun 23, 2021
1 parent 97f92e9 commit fbcdc99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/add-to-ipfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function sendNotification (failures, successes, launchWebUI, path) {
}

fn({ title, body }, () => {
// force refresh for Files screen to pick up newly added items
// https://github.com/ipfs/ipfs-desktop/issues/1763
launchWebUI(link, { forceRefresh: true })
})
}
Expand Down
1 change: 0 additions & 1 deletion src/webui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ module.exports = async function (ctx) {
window.webContents.send('updatedPage', path)
url.hash = path
}

if (focus) {
window.show()
window.focus()
Expand Down
2 changes: 2 additions & 0 deletions src/webui/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ const urlParams = new URLSearchParams(window.location.search)

function checkIfVisible () {
if (document.hidden) {
if (window.location.hash === '#/blank') return // skip, already blank
previousHash = window.location.hash
window.location.hash = '/blank'
} else {
if (previousHash === '#/blank') return // skip
window.location.hash = previousHash
}
}
Expand Down

0 comments on commit fbcdc99

Please sign in to comment.