오디션, 오디션 상세

- 오디션 리스트, 오디션 캐릭터 리스트 아이템 사이 간격 16.7 -> 25로 변경
This commit is contained in:
klaus 2025-01-08 00:53:54 +09:00
parent 9cafb13b50
commit 20b627202e
5 changed files with 53 additions and 51 deletions

View File

@ -35,8 +35,8 @@ android {
applicationId "kr.co.vividnext.sodalive"
minSdk 23
targetSdk 34
versionCode 131
versionName "1.25.0"
versionCode 132
versionName "1.26.0"
}
buildTypes {

View File

@ -62,17 +62,17 @@ class AuditionFragment : BaseFragment<FragmentAuditionBinding>(
when (parent.getChildAdapterPosition(view)) {
0 -> {
outRect.top = 0
outRect.bottom = 8.3f.dpToPx().toInt()
outRect.bottom = 12.5f.dpToPx().toInt()
}
adapter.itemCount - 1 -> {
outRect.top = 8.3f.dpToPx().toInt()
outRect.top = 12.5f.dpToPx().toInt()
outRect.bottom = 0
}
else -> {
outRect.top = 8.3f.dpToPx().toInt()
outRect.bottom = 8.3f.dpToPx().toInt()
outRect.top = 12.5f.dpToPx().toInt()
outRect.bottom = 12.5f.dpToPx().toInt()
}
}
}

View File

@ -105,17 +105,17 @@ class AuditionDetailActivity : BaseActivity<ActivityAuditionDetailBinding>(
when (parent.getChildAdapterPosition(view)) {
0 -> {
outRect.top = 0
outRect.bottom = 7.5f.dpToPx().toInt()
outRect.bottom = 12.5f.dpToPx().toInt()
}
adapter.itemCount - 1 -> {
outRect.top = 7.5f.dpToPx().toInt()
outRect.top = 12.5f.dpToPx().toInt()
outRect.bottom = 0
}
else -> {
outRect.top = 7.5f.dpToPx().toInt()
outRect.bottom = 7.5f.dpToPx().toInt()
outRect.top = 12.5f.dpToPx().toInt()
outRect.bottom = 12.5f.dpToPx().toInt()
}
}
}

View File

@ -138,48 +138,50 @@ class AuditionRoleDetailViewModel(private val repository: AuditionRepository) :
}
fun getAuditionApplicantList() {
_isLoading.value = true
if (!_isLoading.value!! && !isLast) {
_isLoading.value = true
compositeDisposable.add(
repository.getAuditionApplicantList(
auditionRoleId = auditionRoleId,
sortType = _sortTypeLiveData.value!!,
page = page,
size = pageSize,
token = "Bearer ${SharedPreferenceManager.token}"
)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{
if (it.success && it.data != null) {
val data = it.data
_totalCountLiveData.value = data.totalCount
addApplicantList(data.items)
if (data.items.isEmpty()) {
isLast = true
} else {
page += 1
}
} else {
if (it.message != null) {
_toastLiveData.value = it.message
} else {
_toastLiveData.value = "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
}
}
_isLoading.value = false
},
{
_isLoading.value = false
it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
}
compositeDisposable.add(
repository.getAuditionApplicantList(
auditionRoleId = auditionRoleId,
sortType = _sortTypeLiveData.value!!,
page = page,
size = pageSize,
token = "Bearer ${SharedPreferenceManager.token}"
)
)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{
if (it.success && it.data != null) {
val data = it.data
_totalCountLiveData.value = data.totalCount
addApplicantList(data.items)
if (data.items.isEmpty()) {
isLast = true
} else {
page += 1
}
} else {
if (it.message != null) {
_toastLiveData.value = it.message
} else {
_toastLiveData.value = "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
}
}
_isLoading.value = false
},
{
_isLoading.value = false
it.message?.let { message -> Logger.e(message) }
_toastLiveData.postValue("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
}
)
)
}
}
fun applyAudition(auditionRoleId: Long, phoneNumber: String, onSuccess: () -> Unit) {

View File

@ -9,7 +9,7 @@
android:id="@+id/divider"
android:layout_width="0dp"
android:layout_height="6.7dp"
android:layout_marginTop="13.3dp"
android:layout_marginTop="5dp"
android:background="@color/color_232323"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"