Merge pull request #770 from lbryio/issue/614

Fixed sorting by title for published files (#614)
This commit is contained in:
Jeremy Kauffman 2017-11-21 18:05:20 -05:00 committed by GitHub
commit aa42b76b79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -19,6 +19,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
* Long channel names causing inconsistent thumbnail sizes (#721) * Long channel names causing inconsistent thumbnail sizes (#721)
* Fixed regression in #697 causing transaction screen to not load for new users (#755) * Fixed regression in #697 causing transaction screen to not load for new users (#755)
* Fixed scriolling restore/reset/set (#729) * Fixed scriolling restore/reset/set (#729)
* Fixed sorting by title for published files (#614)
### Deprecated ### Deprecated
* *

View file

@ -18,11 +18,11 @@ class FileList extends React.PureComponent {
}, },
title: function(fileInfos) { title: function(fileInfos) {
return fileInfos.slice().sort(function(fileInfo1, fileInfo2) { return fileInfos.slice().sort(function(fileInfo1, fileInfo2) {
const title1 = fileInfo1.metadata const title1 = fileInfo1.value
? fileInfo1.metadata.stream.metadata.title.toLowerCase() ? fileInfo1.value.stream.metadata.title.toLowerCase()
: fileInfo1.name; : fileInfo1.name;
const title2 = fileInfo2.metadata const title2 = fileInfo2.value
? fileInfo2.metadata.stream.metadata.title.toLowerCase() ? fileInfo2.value.stream.metadata.title.toLowerCase()
: fileInfo2.name; : fileInfo2.name;
if (title1 < title2) { if (title1 < title2) {
return -1; return -1;