문자열 리소스 참조로 화면 문구 정리
This commit is contained in:
@@ -6,9 +6,11 @@ import com.orhanobut.logger.Logger
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Flowable
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.audio_content.AudioContentRepository
|
||||
import kr.co.vividnext.sodalive.base.BaseViewModel
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.CreatorCommunityRepository
|
||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse
|
||||
import kr.co.vividnext.sodalive.home.AudioContentMainItem
|
||||
@@ -93,7 +95,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -101,7 +104,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -123,7 +129,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -131,7 +138,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -213,7 +223,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(now.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -231,7 +242,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(reservation.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -271,7 +283,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.postValue(false)
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -295,7 +310,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -303,7 +319,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -328,7 +347,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -336,7 +356,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -363,7 +386,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -371,7 +395,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -395,7 +422,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -403,7 +431,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -468,7 +499,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -476,7 +508,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -509,7 +544,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -517,7 +553,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.postValue(false)
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -552,7 +591,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -560,7 +600,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.postValue(false)
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -594,7 +637,8 @@ class LiveViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -602,7 +646,10 @@ class LiveViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -14,6 +14,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.base.BaseActivity
|
||||
import kr.co.vividnext.sodalive.common.LoadingDialog
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.databinding.ActivityLiveReservationCancelBinding
|
||||
import kr.co.vividnext.sodalive.extensions.dpToPx
|
||||
import kr.co.vividnext.sodalive.main.MainActivity
|
||||
@@ -75,7 +76,8 @@ class LiveReservationCancelActivity : BaseActivity<ActivityLiveReservationCancel
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun setupView() {
|
||||
loadingDialog = LoadingDialog(this, layoutInflater)
|
||||
binding.toolbar.tvBack.text = "예약취소"
|
||||
binding.toolbar.tvBack.text = SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.live_reservation_cancel_action)
|
||||
binding.toolbar.tvBack.setOnClickListener { finish() }
|
||||
|
||||
binding.tvReason1.setOnClickListener {
|
||||
@@ -119,7 +121,9 @@ class LiveReservationCancelActivity : BaseActivity<ActivityLiveReservationCancel
|
||||
|
||||
binding.tvCancel.setOnClickListener {
|
||||
viewModel.cancelReservation {
|
||||
if (binding.tvPrice.text == "무료") {
|
||||
if (binding.tvPrice.text == SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.live_reservation_free)
|
||||
) {
|
||||
binding.tvCancelComplete.visibility = View.GONE
|
||||
} else {
|
||||
binding.tvCancelComplete.visibility = View.VISIBLE
|
||||
@@ -156,7 +160,9 @@ class LiveReservationCancelActivity : BaseActivity<ActivityLiveReservationCancel
|
||||
binding.tvPrice.text = "${response.price}캔"
|
||||
} else {
|
||||
binding.tvCheckCanStatus.visibility = View.GONE
|
||||
binding.tvPrice.text = "무료"
|
||||
binding.tvPrice.text =
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.live_reservation_free)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData
|
||||
import com.orhanobut.logger.Logger
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.base.BaseViewModel
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.live.LiveRepository
|
||||
|
||||
class LiveReservationStatusViewModel(
|
||||
@@ -44,7 +46,8 @@ class LiveReservationStatusViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -53,7 +56,10 @@ class LiveReservationStatusViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -76,7 +82,8 @@ class LiveReservationStatusViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -86,7 +93,10 @@ class LiveReservationStatusViewModel(
|
||||
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -117,7 +127,8 @@ class LiveReservationStatusViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -126,7 +137,10 @@ class LiveReservationStatusViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -8,9 +8,11 @@ import com.orhanobut.logger.Logger
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Single
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.base.BaseViewModel
|
||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.common.Utils
|
||||
import kr.co.vividnext.sodalive.live.LiveRepository
|
||||
import kr.co.vividnext.sodalive.live.room.donation.GetLiveRoomDonationStatusResponse
|
||||
@@ -164,14 +166,18 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -192,14 +198,18 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -236,14 +246,18 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -348,7 +362,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -357,7 +372,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -385,7 +403,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -394,7 +413,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -489,7 +511,9 @@ class LiveRoomViewModel(
|
||||
}
|
||||
|
||||
if (coverImage == null && requestJson == null) {
|
||||
_toastLiveData.value = "변경사항이 없습니다."
|
||||
_toastLiveData.value =
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.msg_live_room_edit_no_changes)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -512,7 +536,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"라이브 정보를 수정하지 못했습니다.\n다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.msg_live_room_edit_update_failed)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -520,7 +545,8 @@ class LiveRoomViewModel(
|
||||
{
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue(
|
||||
"라이브 정보를 수정하지 못했습니다.\n다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.msg_live_room_edit_update_failed)
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -544,7 +570,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -552,7 +579,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -586,7 +616,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
onFailure()
|
||||
@@ -594,7 +625,10 @@ class LiveRoomViewModel(
|
||||
},
|
||||
{
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
onFailure()
|
||||
}
|
||||
)
|
||||
@@ -630,7 +664,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -638,7 +673,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -827,7 +865,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -835,7 +874,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -858,7 +900,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -866,7 +909,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -899,14 +945,18 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue("차단하였습니다.")
|
||||
onSuccess()
|
||||
} else {
|
||||
val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
val message = it.message ?: SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
_toastLiveData.postValue(message)
|
||||
}
|
||||
},
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -929,20 +979,29 @@ class LiveRoomViewModel(
|
||||
getUserProfile(roomId = roomInfoResponse.roomId, userId = userId) {}
|
||||
_toastLiveData.postValue("차단이 해제 되었습니다.")
|
||||
} else {
|
||||
val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
val message = it.message ?: SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
_toastLiveData.postValue(message)
|
||||
}
|
||||
},
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun report(type: ReportType, userId: Long, reason: String = "프로필 신고") {
|
||||
fun report(
|
||||
type: ReportType,
|
||||
userId: Long,
|
||||
reason: String = SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.dialog_member_profile_report_profile)
|
||||
) {
|
||||
_isLoading.value = true
|
||||
|
||||
val request = ReportRequest(type, reason, reportedMemberId = userId)
|
||||
@@ -959,7 +1018,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"신고가 접수되었습니다."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.character_comment_report_submitted)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -968,7 +1028,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("신고가 접수되었습니다.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.character_comment_report_submitted)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -1119,7 +1182,8 @@ class LiveRoomViewModel(
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1128,7 +1192,10 @@ class LiveRoomViewModel(
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -28,6 +28,7 @@ import kr.co.vividnext.sodalive.common.Constants
|
||||
import kr.co.vividnext.sodalive.common.ImagePickerCropper
|
||||
import kr.co.vividnext.sodalive.common.LoadingDialog
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.databinding.ActivityLiveRoomCreateBinding
|
||||
import kr.co.vividnext.sodalive.databinding.ItemLiveTagSelectedBinding
|
||||
import kr.co.vividnext.sodalive.extensions.convertDateFormat
|
||||
@@ -292,7 +293,11 @@ class LiveRoomCreateActivity : BaseActivity<ActivityLiveRoomCreateBinding>(
|
||||
|
||||
if (SharedPreferenceManager.role == MemberRole.CREATOR.name) {
|
||||
binding.llPrice.visibility = View.VISIBLE
|
||||
binding.tvPriceFree.setOnClickListener { binding.etPrice.setText("0") }
|
||||
binding.tvPriceFree.setOnClickListener {
|
||||
binding.etPrice.setText(
|
||||
SodaLiveApplicationHolder.get().getString(R.string.common_zero)
|
||||
)
|
||||
}
|
||||
binding.tvPrice100.setOnClickListener { binding.etPrice.setText("100") }
|
||||
binding.tvPrice300.setOnClickListener { binding.etPrice.setText("300") }
|
||||
binding.tvPrice500.setOnClickListener { binding.etPrice.setText("500") }
|
||||
|
||||
@@ -5,8 +5,10 @@ import androidx.lifecycle.MutableLiveData
|
||||
import com.orhanobut.logger.Logger
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.base.BaseViewModel
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.live.LiveRepository
|
||||
|
||||
class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) : BaseViewModel() {
|
||||
@@ -46,7 +48,8 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) :
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -54,7 +57,10 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) :
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -80,7 +86,8 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) :
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -88,7 +95,10 @@ class LiveRoomDonationMessageViewModel(private val repository: LiveRepository) :
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user