Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
fix: Even though if press "cancel" on download-preview-screen, still …
Browse files Browse the repository at this point in the history
…listed in dat-list.
  • Loading branch information
AtuyL committed Nov 15, 2018
1 parent 653998c commit 894225b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/actions/dat-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,7 @@ export default class DatMiddleware {
})
}

async cancelDownloadDat (key) {
key = encode(key)

async cancelDownloadDat ({ key }) {
this.removeDatInternally(key)
}

Expand All @@ -305,6 +303,7 @@ export default class DatMiddleware {

removeDatInternally (key) {
const { dat } = this.dats[key]
if (!dat) return // maybe was deleted
delete this.dats[key]
if (dat.mirrorProgress) {
dat.mirrorProgress.destroy()
Expand Down
1 change: 1 addition & 0 deletions app/components/table-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const Row = ({
updateTitle
}) => {
const { writable, metadata, key } = dat
if (!metadata) return null
const { title } = metadata
const placeholderTitle = `#${key}`
return (
Expand Down

0 comments on commit 894225b

Please sign in to comment.