문자열 리소스 참조로 화면 문구 정리

This commit is contained in:
2025-12-30 15:46:01 +09:00
parent 1d002c4045
commit dfaa3961bf
43 changed files with 670 additions and 223 deletions

View File

@@ -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.report.ReportRepository
import kr.co.vividnext.sodalive.report.ReportRequest
import kr.co.vividnext.sodalive.report.ReportType
@@ -48,7 +50,8 @@ class UserViewModel(
_toastLiveData.postValue(it.message)
} else {
_toastLiveData.postValue(
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
SodaLiveApplicationHolder.get()
.getString(R.string.msg_can_coupon_unknown_error)
)
}
}
@@ -57,7 +60,8 @@ class UserViewModel(
_isLoading.value = false
it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue(
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
SodaLiveApplicationHolder.get()
.getString(R.string.msg_can_coupon_unknown_error)
)
}
)
@@ -81,14 +85,18 @@ class UserViewModel(
_toastLiveData.postValue("차단하였습니다.")
onSuccess()
} else {
val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
val message = it.message ?: SodaLiveApplicationHolder.get()
.getString(R.string.msg_can_coupon_unknown_error)
_toastLiveData.postValue(message)
}
},
{
_isLoading.value = false
it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
_toastLiveData.postValue(
SodaLiveApplicationHolder.get()
.getString(R.string.msg_can_coupon_unknown_error)
)
}
)
)
@@ -111,14 +119,18 @@ class UserViewModel(
_toastLiveData.postValue("차단이 해제 되었습니다.")
onSuccess()
} else {
val message = it.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
val message = it.message ?: SodaLiveApplicationHolder.get()
.getString(R.string.msg_can_coupon_unknown_error)
_toastLiveData.postValue(message)
}
},
{
_isLoading.value = false
it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
_toastLiveData.postValue(
SodaLiveApplicationHolder.get()
.getString(R.string.msg_can_coupon_unknown_error)
)
}
)
)
@@ -127,7 +139,8 @@ class UserViewModel(
fun report(
type: ReportType,
userId: Long,
reason: String = "프로필 신고",
reason: String = SodaLiveApplicationHolder.get()
.getString(R.string.dialog_member_profile_report_profile),
onSuccess: () -> Unit
) {
_isLoading.value = true
@@ -146,7 +159,8 @@ class UserViewModel(
_toastLiveData.postValue(it.message)
} else {
_toastLiveData.postValue(
"신고가 접수되었습니다."
SodaLiveApplicationHolder.get()
.getString(R.string.character_comment_report_submitted)
)
}
@@ -156,7 +170,10 @@ class UserViewModel(
{
_isLoading.value = false
it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("신고가 접수되었습니다.")
_toastLiveData.postValue(
SodaLiveApplicationHolder.get()
.getString(R.string.character_comment_report_submitted)
)
onSuccess()
}
)