if (
getName(MessageEnum.RestAPIResponceMessage) === message.id &&
this.mostgenrelistCallId !== null &&
this.mostgenrelistCallId ===
message.getData(getName(MessageEnum.RestAPIResponceDataMessage))
) {
this.mostgenrelistCallId = null
var responseJson = message.getData(
getName(MessageEnum.RestAPIResponceSuccessMessage),
)
if (responseJson && !responseJson.errors) {
console.log(responseJson,"responseJson.dataresponseJson.dataresponseJson.data")
this.setState({ popularGenreList: responseJson.data })
// this.setState({ loader: false })
} else {
this.parseApiErrorResponse(responseJson.data)
// this.setState({ loader: false })
}
}
if (
getName(MessageEnum.RestAPIResponceMessage) === message.id &&
this.usergenrelistCallId !== null &&
this.usergenrelistCallId ===
message.getData(getName(MessageEnum.RestAPIResponceDataMessage))
) {
this.usergenrelistCallId = null
var responseJson = message.getData(
getName(MessageEnum.RestAPIResponceSuccessMessage),
)
if (responseJson && !responseJson.errors) {
console.log("psnpnkere", responseJson, this.state.showsearch)
this.setState({ followingGenreList: responseJson.data })
this.setState({ loader: false })
console.log('genre id on profile dscsdpage>>>', this.state.followingGenreList)
} else if (responseJson.errors) {
// this.setState({ loader: false })
} else {
this.parseApiErrorResponse(responseJson.data)
// this.setState({ loader: false })
}
}
if (
getName(MessageEnum.RestAPIResponceMessage) === message.id &&
this.unfollowingGenre !== null &&
this.unfollowingGenre ===
message.getData(getName(MessageEnum.RestAPIResponceDataMessage))
) {
this.unfollowingGenre = null
var responseJson = message.getData(
getName(MessageEnum.RestAPIResponceSuccessMessage),
)
if (responseJson && !responseJson.errors) {
this.setState({ loader: false })
this.setState({ followingGenreList: [] })
this.UserFollowingGenrelistApi()
this.MostPopularGenrelistApi()
this.GenrelistApi()
} else if (responseJson.errors) {
this.setState({ loader: false })
} else {
this.parseApiErrorResponse(responseJson.data)
this.setState({ loader: false })
}
}
if (
getName(MessageEnum.RestAPIResponceMessage) === message.id &&
this.followingGenre !== null &&
this.followingGenre ===
message.getData(getName(MessageEnum.RestAPIResponceDataMessage))
) {
this.followingGenre = null
var responseJson = message.getData(
getName(MessageEnum.RestAPIResponceSuccessMessage),
)
if (responseJson && !responseJson.errors) {
this.setState({ loader: false })
this.setState({ followingGenreList: [] })
this.UserFollowingGenrelistApi()
this.MostPopularGenrelistApi()
this.GenrelistApi()
} else if (responseJson.errors) {
this.setState({ loader: false })
} else {
this.parseApiErrorResponse(responseJson.data)
this.setState({ loader: false })
}
}