Browse Source

Clicking on play button next to song title on playlist page was not starting playback when nothing was already playing

Phyks (Lucas Verney) 5 years ago
parent
commit
5f6eec6330
4 changed files with 10 additions and 5 deletions
  1. 6
    1
      app/views/PlaylistPage.jsx
  2. 1
    1
      public/fix.ie9.js.map
  3. 2
    2
      public/index.js
  4. 1
    1
      public/index.js.map

+ 6
- 1
app/views/PlaylistPage.jsx View File

@@ -16,8 +16,13 @@ import Playlist from "../components/Playlist";
16 16
  */
17 17
 class PlaylistPage extends Component {
18 18
     render() {
19
+        const actions = this.props.actions;
20
+        const playAction = function (id) {
21
+            actions.jumpToSong(id);
22
+            actions.togglePlaying(true);
23
+        };
19 24
         return (
20
-            <Playlist playAction={this.props.actions.jumpToSong} playNextAction={null} flushAction={this.props.actions.stopPlayback} songs={this.props.songsList} currentIndex={this.props.currentIndex} />
25
+            <Playlist playAction={playAction} playNextAction={null} flushAction={actions.stopPlayback} songs={this.props.songsList} currentIndex={this.props.currentIndex} />
21 26
         );
22 27
     }
23 28
 }

+ 1
- 1
public/fix.ie9.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
public/index.js
File diff suppressed because it is too large
View File


+ 1
- 1
public/index.js.map
File diff suppressed because it is too large
View File