mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +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,
|
currentStep: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_hacks = {
|
||||||
|
revertTrackOrders: () => {
|
||||||
|
this.setState({
|
||||||
|
trackList: this.state.trackList.reverse()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updatePlaylistData = (key, data) => {
|
updatePlaylistData = (key, data) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
playlistData: {
|
playlistData: {
|
||||||
@ -400,6 +408,8 @@ export default class PlaylistCreatorSteps extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
window._hacks = this._hacks
|
||||||
|
|
||||||
if (this.props.playlist_id) {
|
if (this.props.playlist_id) {
|
||||||
this.loadPlaylistData(this.props.playlist_id)
|
this.loadPlaylistData(this.props.playlist_id)
|
||||||
} else {
|
} else {
|
||||||
@ -409,6 +419,10 @@ export default class PlaylistCreatorSteps extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
delete window._hacks
|
||||||
|
}
|
||||||
|
|
||||||
loadPlaylistData = async (playlist_id) => {
|
loadPlaylistData = async (playlist_id) => {
|
||||||
console.log(`Loading playlist data for playlist ${playlist_id}...`)
|
console.log(`Loading playlist data for playlist ${playlist_id}...`)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user