mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added some hacks
This commit is contained in:
parent
4f4f01ce83
commit
10db01bfef
@ -34,6 +34,14 @@ export default class PlaylistCreatorSteps extends React.Component {
|
||||
currentStep: 0,
|
||||
}
|
||||
|
||||
_hacks = {
|
||||
revertTrackOrders: () => {
|
||||
this.setState({
|
||||
trackList: this.state.trackList.reverse()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
updatePlaylistData = (key, data) => {
|
||||
this.setState({
|
||||
playlistData: {
|
||||
@ -400,6 +408,8 @@ export default class PlaylistCreatorSteps extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window._hacks = this._hacks
|
||||
|
||||
if (this.props.playlist_id) {
|
||||
this.loadPlaylistData(this.props.playlist_id)
|
||||
} else {
|
||||
@ -409,6 +419,10 @@ export default class PlaylistCreatorSteps extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
delete window._hacks
|
||||
}
|
||||
|
||||
loadPlaylistData = async (playlist_id) => {
|
||||
console.log(`Loading playlist data for playlist ${playlist_id}...`)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user