accountId -> memberId 이름 변경
This commit is contained in:
parent
1329ae5e5d
commit
0563fe6890
|
@ -78,7 +78,7 @@ class UserProfileViewModel(
|
|||
fun report(type: ReportType, userId: Long, reason: String = "프로필 신고") {
|
||||
_isLoading.value = true
|
||||
|
||||
val request = ReportRequest(type, reason, reportedAccountId = userId)
|
||||
val request = ReportRequest(type, reason, reportedMemberId = userId)
|
||||
compositeDisposable.add(
|
||||
reportRepository.report(
|
||||
request = request,
|
||||
|
|
|
@ -137,14 +137,14 @@ class LiveRepository(
|
|||
|
||||
fun setSpeaker(roomId: Long, userId: Long, token: String): Single<ApiResponse<Any>> {
|
||||
return api.setSpeaker(
|
||||
request = SetManagerOrSpeakerOrAudienceRequest(roomId, accountId = userId),
|
||||
request = SetManagerOrSpeakerOrAudienceRequest(roomId, memberId = userId),
|
||||
authHeader = token
|
||||
)
|
||||
}
|
||||
|
||||
fun setListener(roomId: Long, userId: Long, token: String): Single<ApiResponse<Any>> {
|
||||
return api.setListener(
|
||||
request = SetManagerOrSpeakerOrAudienceRequest(roomId, accountId = userId),
|
||||
request = SetManagerOrSpeakerOrAudienceRequest(roomId, memberId = userId),
|
||||
authHeader = token
|
||||
)
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class LiveRepository(
|
|||
}
|
||||
|
||||
fun setManager(roomId: Long, userId: Long, token: String) = api.setManager(
|
||||
request = SetManagerOrSpeakerOrAudienceRequest(roomId, accountId = userId),
|
||||
request = SetManagerOrSpeakerOrAudienceRequest(roomId, memberId = userId),
|
||||
authHeader = token,
|
||||
)
|
||||
|
||||
|
|
|
@ -206,18 +206,18 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||
roomInfoLiveData = viewModel.roomInfoLiveData,
|
||||
isStaff = {
|
||||
viewModel.isEqualToManagerId(
|
||||
accountId = SharedPreferenceManager.userId.toInt()
|
||||
memberId = SharedPreferenceManager.userId.toInt()
|
||||
)
|
||||
},
|
||||
onClickInviteSpeaker = { accountId ->
|
||||
onClickInviteSpeaker = { memberId ->
|
||||
if (speakerListAdapter.itemCount <= 9) {
|
||||
inviteSpeaker(accountId)
|
||||
inviteSpeaker(memberId)
|
||||
} else {
|
||||
showToast("스피커 정원이 초과했습니다.")
|
||||
}
|
||||
},
|
||||
onClickChangeListener = { accountId ->
|
||||
if (accountId == SharedPreferenceManager.userId) {
|
||||
onClickChangeListener = { memberId ->
|
||||
if (memberId == SharedPreferenceManager.userId) {
|
||||
handler.post {
|
||||
viewModel.setListener(
|
||||
roomId,
|
||||
|
@ -231,7 +231,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||
return@LiveRoomProfileDialog
|
||||
}
|
||||
|
||||
changeListenerMessage(accountId)
|
||||
changeListenerMessage(memberId)
|
||||
},
|
||||
onClickKickOut = {
|
||||
LiveDialog(
|
||||
|
|
|
@ -95,21 +95,21 @@ class LiveRoomViewModel(
|
|||
return ""
|
||||
}
|
||||
|
||||
fun getUserProfileUrl(accountId: Int): String {
|
||||
fun getUserProfileUrl(memberId: Int): String {
|
||||
for (manager in roomInfoResponse.managerList) {
|
||||
if (manager.id.toInt() == accountId) {
|
||||
if (manager.id.toInt() == memberId) {
|
||||
return manager.profileImage
|
||||
}
|
||||
}
|
||||
|
||||
for (speaker in roomInfoResponse.speakerList) {
|
||||
if (speaker.id.toInt() == accountId) {
|
||||
if (speaker.id.toInt() == memberId) {
|
||||
return speaker.profileImage
|
||||
}
|
||||
}
|
||||
|
||||
for (listener in roomInfoResponse.listenerList) {
|
||||
if (listener.id.toInt() == accountId) {
|
||||
if (listener.id.toInt() == memberId) {
|
||||
return listener.profileImage
|
||||
}
|
||||
}
|
||||
|
@ -212,8 +212,8 @@ class LiveRoomViewModel(
|
|||
)
|
||||
}
|
||||
|
||||
fun isEqualToHostId(accountId: Int): Boolean {
|
||||
return accountId == roomInfoResponse.managerId.toInt()
|
||||
fun isEqualToHostId(memberId: Int): Boolean {
|
||||
return memberId == roomInfoResponse.managerId.toInt()
|
||||
}
|
||||
|
||||
fun getMemberCan() {
|
||||
|
@ -674,9 +674,9 @@ class LiveRoomViewModel(
|
|||
)
|
||||
}
|
||||
|
||||
fun isEqualToManagerId(accountId: Int): Boolean {
|
||||
fun isEqualToManagerId(memberId: Int): Boolean {
|
||||
for (manager in roomInfoResponse.managerList) {
|
||||
if (manager.id == accountId.toLong()) {
|
||||
if (manager.id == memberId.toLong()) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -747,7 +747,7 @@ class LiveRoomViewModel(
|
|||
fun report(type: ReportType, userId: Long, reason: String = "프로필 신고") {
|
||||
_isLoading.value = true
|
||||
|
||||
val request = ReportRequest(type, reason, reportedAccountId = userId)
|
||||
val request = ReportRequest(type, reason, reportedMemberId = userId)
|
||||
compositeDisposable.add(
|
||||
reportRepository.report(
|
||||
request = request,
|
||||
|
|
|
@ -4,5 +4,5 @@ import com.google.gson.annotations.SerializedName
|
|||
|
||||
data class SetManagerOrSpeakerOrAudienceRequest(
|
||||
@SerializedName("roomId") val roomId: Long,
|
||||
@SerializedName("accountId") val accountId: Long
|
||||
@SerializedName("memberId") val memberId: Long
|
||||
)
|
||||
|
|
|
@ -5,13 +5,12 @@ import com.google.gson.annotations.SerializedName
|
|||
data class ReportRequest(
|
||||
@SerializedName("type") val type: ReportType,
|
||||
@SerializedName("reason") val reason: String,
|
||||
@SerializedName("reportedAccountId") val reportedAccountId: Long? = null,
|
||||
@SerializedName("reportedMemberId") val reportedMemberId: Long? = null,
|
||||
@SerializedName("cheersId") val cheersId: Long? = null,
|
||||
@SerializedName("audioContentId") val contentId: Long? = null,
|
||||
)
|
||||
|
||||
enum class ReportType {
|
||||
@SerializedName("REVIEW") REVIEW,
|
||||
@SerializedName("PROFILE") PROFILE,
|
||||
@SerializedName("USER") USER,
|
||||
@SerializedName("CHEERS") CHEERS,
|
||||
|
|
Loading…
Reference in New Issue