Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 마이페이지 3차 QA 대응 #418

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ class MyLibraryFragment : BaseFragment<FragmentMyLibraryBinding>(R.layout.fragme
private fun createKeywordChip(data: NovelPreferenceEntity.KeywordEntity): Chip {
return WebsosoChip(requireContext()).apply {
text = "${data.keywordName} ${data.keywordCount}"
isCheckable = true
isCheckable = false
isChecked = false
isEnabled = false

setChipBackgroundColorResource(R.color.primary_50_F1EFFF)
setTextColor(ContextCompat.getColor(requireContext(), R.color.primary_100_6A5DFD))
Expand All @@ -159,4 +160,9 @@ class MyLibraryFragment : BaseFragment<FragmentMyLibraryBinding>(R.layout.fragme
}
}
}

override fun onResume() {
super.onResume()
myLibraryViewModel.loadMyLibrary()
}
Comment on lines +164 to +167
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r: 이거 저나 산군 붙잡고 같이 해보면 될 것 같아요

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class MyLibraryViewModel @Inject constructor(
private var userId: Long = -1

init {
loadMyLibrary()
}

fun loadMyLibrary(){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c: updateMyLibrary ? 는 어때욥

viewModelScope.launch {
userId = userRepository.fetchUserId()
updateNovelStats(userId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package com.teamwss.websoso.ui.main.myPage.myLibrary.model
enum class AttractivePoints(val korean: String) {
CHARACTER("캐릭터"),
RELATIONSHIP("관계"),
WORLDVIEW("세계관"),
VIBE("분위기"),
MATERIAL("소재");

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,17 @@ class UserStorageActivity : BaseActivity<ActivityStorageBinding>(R.layout.activi
userStorageViewModel.updateSortType(sortType)
}

binding.ivStorageGoToSort.setOnClickListener { view ->
binding.clStorageSort.setOnClickListener { view ->
sortMenuHandler.showSortMenu(view)
}
}

override fun onResume() {
super.onResume()
val currentReadStatus = userStorageViewModel.uiState.value?.readStatus ?: StorageTab.INTEREST.readStatus
userStorageViewModel.updateReadStatus(currentReadStatus, forceLoad = true)
}

companion object {
fun getIntent(context: Context): Intent {
return Intent(context, UserStorageActivity::class.java)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_profile_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
android:background="@null"
android:gravity="top"
android:hint="@string/edit_profile_introduction_hint"
android:maxLength="60"
android:maxLength="50"
android:maxLines="4"
android:minHeight="44dp"
android:text="@{viewModel.profileEditUiState.profile.introduction}"
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/res/layout/activity_storage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_storage_sort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="@{() -> onSortTypeClick.invoke()}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent">

<ImageView
android:id="@+id/iv_storage_go_to_sort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="@{() -> onSortTypeClick.invoke()}"
android:paddingEnd="28dp"
android:paddingStart="8dp"
android:paddingVertical="8dp"
Expand All @@ -142,6 +149,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_storage_go_to_sort"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/fragment_my_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@

<TextView
android:id="@+id/tv_my_page_user_description"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginHorizontal="20dp"
android:paddingBottom="30dp"
android:gravity="center"
android:text='@{myPageViewModel.myPageUiState.myProfile.intro}'
android:textAppearance="@style/body2"
android:textColor="@color/gray_200_AEADB3"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
<string name="profile_edit_duplicate">중복확인</string>
<string name="profile_edit_introduction">소개</string>
<string name="edit_profile_introduction_hint">소개글을 적어보세요!</string>
<string name="profile_edit_introduction_max_count">%d/60</string>
<string name="profile_edit_introduction_max_count">%d/50</string>
<string name="profile_edit_prefer_genre">선호장르</string>
<string name="profile_edit_prefer_genre_description">선택한 장르에 맞춰 작품을 추천해드려요</string>
<string name="profile_edit_avatar_title">프로필 선택</string>
Expand Down