fix(creator): 채널 홈 토스트 이벤트를 단발 처리한다

This commit is contained in:
2026-06-15 13:21:34 +09:00
parent a20655badb
commit febd718796
2 changed files with 18 additions and 8 deletions

View File

@@ -21,8 +21,8 @@ class CreatorChannelHomeViewModel(
val homeStateLiveData: LiveData<CreatorChannelHomeUiState>
get() = _homeStateLiveData
private val _toastLiveData = MutableLiveData<ToastMessage?>()
val toastLiveData: LiveData<ToastMessage?>
private val _toastLiveData = MutableLiveData<CreatorChannelEvent<ToastMessage>>()
val toastLiveData: LiveData<CreatorChannelEvent<ToastMessage>>
get() = _toastLiveData
private val _chatRoomIdLiveData = MutableLiveData<CreatorChannelEvent<Long>>()
@@ -124,7 +124,7 @@ class CreatorChannelHomeViewModel(
}
private fun showUnknownErrorToast() {
_toastLiveData.value = ToastMessage(resId = R.string.common_error_unknown)
_toastLiveData.value = CreatorChannelEvent(ToastMessage(resId = R.string.common_error_unknown))
}
private fun authToken(): String = "Bearer ${SharedPreferenceManager.token}"