diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-12 00:20:50 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-12 00:20:50 +0200 |
| commit | 20b98e565e704ab27d8745a8dcc852b4ee3effc4 (patch) | |
| tree | fa600aa188f1ea8fdfe78fe6b1f81c378254a29d /public/assets/js/lib/views/details/files.js | |
| parent | 798890c4e73981153e856668e0181ef384dea2a5 (diff) | |
slightly cleaner audio/files behavior
Diffstat (limited to 'public/assets/js/lib/views/details/files.js')
| -rw-r--r-- | public/assets/js/lib/views/details/files.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js index 3cfd1c9..00ca201 100644 --- a/public/assets/js/lib/views/details/files.js +++ b/public/assets/js/lib/views/details/files.js @@ -20,8 +20,10 @@ var FilesView = FormView.extend({ this.$el.hide() } var total = 0, has_music = false - this.files = files - files.forEach(function(file){ + + this.files = files || this.files + this.thread = thread || this.thread + this.files.forEach(function(file){ if (is_image(file.filename)) { // return } @@ -36,7 +38,8 @@ var FilesView = FormView.extend({ audio.init() } - this.resort(thread.settings.sort || "name_asc") + const sort = this.thread.settings.sort || "name_asc" + this.resort(sort) }, files: [], |
