Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #7364 from brave/fix-7362
Browse files Browse the repository at this point in the history
Torrent name is missing once download is started
  • Loading branch information
bsclifton authored Mar 19, 2017
2 parents 7dab6b1 + 4cfc7e4 commit 842ec25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/extensions/torrent/locales/en-US/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ num=#
downloadFile=Save File
torrentStatus=Torrent Status
torrentLoadingInfo=Loading torrent info...
torrentUntitled=Untitled torrent
torrentLoadingMedia=Loading...
16 changes: 8 additions & 8 deletions js/webtorrent/components/torrentViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ class TorrentViewer extends React.Component {
render () {
const {torrent, torrentID, name, errorMessage, dispatch} = this.props

const l10nTitle = name
? '' // No localization, just use the torrent name
: torrent
? 'torrentLoadingInfo' // eg 'Loading torrent information...'
: 'torrentUntitled' // eg 'Untitled torrent'
const l10nStart = name ? 'startPrompt' : 'startPromptUntitled'

let titleElem, mainButtonId
if (torrent) {
titleElem = <div className='sectionTitle' data-l10n-id={l10nTitle}>{name}</div>
if (name) {
// No localization, just use the torrent name
titleElem = <div className='sectionTitle'>{name}</div>
} else {
// 'Loading torrent information...'
titleElem = <div className='sectionTitle' data-l10n-id='torrentLoadingInfo' />
}
mainButtonId = torrent.progress < 1 ? 'downloading' : 'seeding'
} else {
const l10nStart = name ? 'startPrompt' : 'startPromptUntitled'
const l10nArgs = {name}
titleElem = (
<div
Expand Down

0 comments on commit 842ec25

Please sign in to comment.