라이브룸 상세/태그 다이얼로그 문자열 리소스화
This commit is contained in:
@@ -17,6 +17,7 @@ import com.orhanobut.logger.Logger
|
||||
import kr.co.vividnext.sodalive.BuildConfig
|
||||
import kr.co.vividnext.sodalive.common.ImageLoaderProvider
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.SodaLiveApplicationHolder
|
||||
import kr.co.vividnext.sodalive.di.AppDI
|
||||
import kr.co.vividnext.sodalive.tracking.FirebaseTracking
|
||||
import tech.notifly.Notifly
|
||||
@@ -36,6 +37,7 @@ class SodaLiveApp : Application(), DefaultLifecycleObserver {
|
||||
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
|
||||
|
||||
SodaLiveApplicationHolder.init(this)
|
||||
SharedPreferenceManager.init(applicationContext)
|
||||
|
||||
ImageLoaderProvider.init(applicationContext)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package kr.co.vividnext.sodalive.common
|
||||
|
||||
import android.app.Application
|
||||
|
||||
object SodaLiveApplicationHolder {
|
||||
private lateinit var application: Application
|
||||
|
||||
fun init(app: Application) {
|
||||
application = app
|
||||
}
|
||||
|
||||
fun get(): Application = application
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class LiveRoomDetailFragment(
|
||||
0
|
||||
)
|
||||
} else {
|
||||
binding.tvCan.text = "무료"
|
||||
binding.tvCan.text = getString(R.string.screen_live_room_free)
|
||||
binding.tvCan.setCompoundDrawablesWithIntrinsicBounds(
|
||||
0,
|
||||
0,
|
||||
@@ -156,7 +156,7 @@ class LiveRoomDetailFragment(
|
||||
binding.ivShare2.setOnClickListener { shareRoom(response) }
|
||||
|
||||
if (response.channelName.isNullOrBlank()) {
|
||||
binding.tvParticipateExpression.text = "예약자"
|
||||
binding.tvParticipateExpression.setText(R.string.live_reservation_complete)
|
||||
when {
|
||||
response.manager.id == SharedPreferenceManager.userId -> {
|
||||
binding.llStartDelete.visibility = View.VISIBLE
|
||||
@@ -225,7 +225,8 @@ class LiveRoomDetailFragment(
|
||||
binding.llProfiles.visibility = View.GONE
|
||||
binding.rvParticipate.visibility = View.VISIBLE
|
||||
binding.tvParticipateExpression.visibility = View.VISIBLE
|
||||
binding.tvOpenAllProfile.text = "닫기"
|
||||
binding.tvOpenAllProfile.text =
|
||||
getString(R.string.screen_live_room_collapse)
|
||||
binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds(
|
||||
R.drawable.ic_live_detail_top,
|
||||
0,
|
||||
@@ -236,7 +237,8 @@ class LiveRoomDetailFragment(
|
||||
binding.llProfiles.visibility = View.VISIBLE
|
||||
binding.rvParticipate.visibility = View.GONE
|
||||
binding.tvParticipateExpression.visibility = View.GONE
|
||||
binding.tvOpenAllProfile.text = "펼쳐보기"
|
||||
binding.tvOpenAllProfile.text =
|
||||
getString(R.string.screen_live_room_expand)
|
||||
binding.tvOpenAllProfile.setCompoundDrawablesWithIntrinsicBounds(
|
||||
R.drawable.ic_live_detail_bottom,
|
||||
0,
|
||||
@@ -358,7 +360,10 @@ class LiveRoomDetailFragment(
|
||||
intent.type = "text/plain"
|
||||
intent.putExtra(Intent.EXTRA_TEXT, it)
|
||||
|
||||
val shareIntent = Intent.createChooser(intent, "라이브 공유")
|
||||
val shareIntent = Intent.createChooser(
|
||||
intent,
|
||||
getString(R.string.screen_live_room_share_title)
|
||||
)
|
||||
startActivity(shareIntent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.common.Utils
|
||||
import kr.co.vividnext.sodalive.live.LiveRepository
|
||||
|
||||
@@ -42,7 +44,8 @@ class LiveRoomDetailViewModel(private val repository: LiveRepository) : BaseView
|
||||
_toastLiveData.postValue(it.message)
|
||||
} else {
|
||||
_toastLiveData.postValue(
|
||||
"알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
}
|
||||
onFailure()
|
||||
@@ -51,7 +54,10 @@ class LiveRoomDetailViewModel(private val repository: LiveRepository) : BaseView
|
||||
{
|
||||
_isLoading.value = false
|
||||
it.message?.let { message -> Logger.e(message) }
|
||||
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
_toastLiveData.postValue(
|
||||
SodaLiveApplicationHolder.get()
|
||||
.getString(R.string.screen_live_room_unknown_error)
|
||||
)
|
||||
onFailure()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
class LiveTagViewModel(private val repository: LiveTagRepository) : BaseViewModel() {
|
||||
private val _toastLiveData = MutableLiveData<String?>()
|
||||
@@ -31,14 +33,18 @@ class LiveTagViewModel(private val repository: LiveTagRepository) : BaseViewMode
|
||||
_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)
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user