Compare commits
7 Commits
4ec828b892
...
f0977d9433
| Author | SHA1 | Date | |
|---|---|---|---|
| f0977d9433 | |||
| 13ac1fb435 | |||
| 76c45b62d7 | |||
| 667be467a4 | |||
| 388ba05700 | |||
| 2620bb5b93 | |||
| eba4a444bc |
@@ -107,6 +107,12 @@ adb shell am instrument -w -e class kr.co.vividnext.sodalive.SomeInstrumentedTes
|
|||||||
- 기본 스택은 JUnit4 + MockK/Mockito다.
|
- 기본 스택은 JUnit4 + MockK/Mockito다.
|
||||||
- 테스트 추가 시 단일 실행 명령 예시도 본 문서에 갱신한다.
|
- 테스트 추가 시 단일 실행 명령 예시도 본 문서에 갱신한다.
|
||||||
|
|
||||||
|
### 6) 주석
|
||||||
|
- 의미 단위별로 주석을 작성한다.
|
||||||
|
- 주석은 한 문장으로 간결하게 작성한다.
|
||||||
|
- 주석은 코드의 의도와 구조를 설명한다.
|
||||||
|
- 주석은 코드 변경 시 업데이트를 잊지 않는다.
|
||||||
|
|
||||||
## 커밋 메시지 규칙 (표준 Conventional Commits)
|
## 커밋 메시지 규칙 (표준 Conventional Commits)
|
||||||
- 커밋 상세 가이드/절차는 `.opencode/skills/commit-policy/SKILL.md`를 단일 기준으로 사용한다.
|
- 커밋 상세 가이드/절차는 `.opencode/skills/commit-policy/SKILL.md`를 단일 기준으로 사용한다.
|
||||||
- 커밋 작업 시작 시 `skill` 도구로 `commit-policy`를 먼저 로드한다.
|
- 커밋 작업 시작 시 `skill` 도구로 `commit-policy`를 먼저 로드한다.
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ android {
|
|||||||
applicationId "kr.co.vividnext.sodalive"
|
applicationId "kr.co.vividnext.sodalive"
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 35
|
targetSdk 35
|
||||||
versionCode 225
|
versionCode 227
|
||||||
versionName "1.52.0"
|
versionName "1.52.1"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import kr.co.vividnext.sodalive.R
|
|||||||
import kr.co.vividnext.sodalive.databinding.ItemCreatorCommunityBinding
|
import kr.co.vividnext.sodalive.databinding.ItemCreatorCommunityBinding
|
||||||
import kr.co.vividnext.sodalive.extensions.dpToPx
|
import kr.co.vividnext.sodalive.extensions.dpToPx
|
||||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
import kr.co.vividnext.sodalive.extensions.loadUrl
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.relativeTimeText
|
|
||||||
|
|
||||||
class CreatorCommunityAdapter(
|
class CreatorCommunityAdapter(
|
||||||
private val width: Int,
|
private val width: Int,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import kr.co.vividnext.sodalive.common.ApiResponse
|
|||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PostCommunityPostLikeRequest
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PostCommunityPostLikeRequest
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PurchasePostRequest
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PurchasePostRequest
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.comment.CreateCommunityPostCommentRequest
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.comment.CreateCommunityPostCommentRequest
|
||||||
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.UpdateCommunityPostFixedRequest
|
||||||
import okhttp3.MultipartBody
|
import okhttp3.MultipartBody
|
||||||
import okhttp3.RequestBody
|
import okhttp3.RequestBody
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
||||||
@@ -99,4 +100,10 @@ interface CreatorCommunityApi {
|
|||||||
@Body request: PurchasePostRequest,
|
@Body request: PurchasePostRequest,
|
||||||
@Header("Authorization") authHeader: String
|
@Header("Authorization") authHeader: String
|
||||||
): Single<ApiResponse<GetCommunityPostListResponse>>
|
): Single<ApiResponse<GetCommunityPostListResponse>>
|
||||||
|
|
||||||
|
@PUT("/creator-community/fixed")
|
||||||
|
fun updateCommunityPostFixed(
|
||||||
|
@Body request: UpdateCommunityPostFixedRequest,
|
||||||
|
@Header("Authorization") authHeader: String
|
||||||
|
): Single<ApiResponse<Any>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import kr.co.vividnext.sodalive.audio_content.comment.ModifyCommentRequest
|
|||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PostCommunityPostLikeRequest
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PostCommunityPostLikeRequest
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PurchasePostRequest
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.PurchasePostRequest
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.comment.CreateCommunityPostCommentRequest
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.comment.CreateCommunityPostCommentRequest
|
||||||
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.UpdateCommunityPostFixedRequest
|
||||||
import okhttp3.MultipartBody
|
import okhttp3.MultipartBody
|
||||||
import okhttp3.RequestBody
|
import okhttp3.RequestBody
|
||||||
import java.util.TimeZone
|
import java.util.TimeZone
|
||||||
@@ -109,4 +110,10 @@ class CreatorCommunityRepository(private val api: CreatorCommunityApi) {
|
|||||||
request = PurchasePostRequest(postId = postId, timezone = TimeZone.getDefault().id),
|
request = PurchasePostRequest(postId = postId, timezone = TimeZone.getDefault().id),
|
||||||
authHeader = token
|
authHeader = token
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun updateCommunityPostFixed(postId: Long, isFixed: Boolean, token: String) =
|
||||||
|
api.updateCommunityPostFixed(
|
||||||
|
request = UpdateCommunityPostFixedRequest(postId = postId, isFixed = isFixed),
|
||||||
|
authHeader = token
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ data class GetCommunityPostListResponse(
|
|||||||
@SerializedName("likeCount") val likeCount: Int,
|
@SerializedName("likeCount") val likeCount: Int,
|
||||||
@SerializedName("commentCount") val commentCount: Int,
|
@SerializedName("commentCount") val commentCount: Int,
|
||||||
@SerializedName("firstComment") val firstComment: GetCommunityPostCommentListItem?,
|
@SerializedName("firstComment") val firstComment: GetCommunityPostCommentListItem?,
|
||||||
|
@SerializedName("isFixed") val isFixed: Boolean,
|
||||||
@SerializedName("isExpand") var isExpand: Boolean = false
|
@SerializedName("isExpand") var isExpand: Boolean = false
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import kr.co.vividnext.sodalive.base.BaseActivity
|
|||||||
import kr.co.vividnext.sodalive.base.SodaDialog
|
import kr.co.vividnext.sodalive.base.SodaDialog
|
||||||
import kr.co.vividnext.sodalive.common.Constants
|
import kr.co.vividnext.sodalive.common.Constants
|
||||||
import kr.co.vividnext.sodalive.common.GridSpacingItemDecoration
|
import kr.co.vividnext.sodalive.common.GridSpacingItemDecoration
|
||||||
|
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||||
import kr.co.vividnext.sodalive.common.LoadingDialog
|
import kr.co.vividnext.sodalive.common.LoadingDialog
|
||||||
import kr.co.vividnext.sodalive.databinding.ActivityCreatorCommunityAllBinding
|
import kr.co.vividnext.sodalive.databinding.ActivityCreatorCommunityAllBinding
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse
|
import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse
|
||||||
@@ -166,11 +167,14 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
|
|||||||
switchToGridMode(anchorPosition = listAnchorPosition)
|
switchToGridMode(anchorPosition = listAnchorPosition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
|
onBackPressedDispatcher.addCallback(
|
||||||
override fun handleOnBackPressed() {
|
this,
|
||||||
handleBackNavigation()
|
object : OnBackPressedCallback(true) {
|
||||||
|
override fun handleOnBackPressed() {
|
||||||
|
handleBackNavigation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
|
|
||||||
listAdapter = CreatorCommunityAllAdapter(
|
listAdapter = CreatorCommunityAllAdapter(
|
||||||
screenWidth = screenWidth,
|
screenWidth = screenWidth,
|
||||||
@@ -219,6 +223,9 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
|
|||||||
)
|
)
|
||||||
}.show(screenWidth)
|
}.show(screenWidth)
|
||||||
},
|
},
|
||||||
|
onClickToggleFixed = { postId, isFixed ->
|
||||||
|
viewModel.updateCommunityPostFixed(postId, isFixed)
|
||||||
|
},
|
||||||
onClickAudioContentPlayOrPause = { mediaPlayerManager.toggleContent(it) },
|
onClickAudioContentPlayOrPause = { mediaPlayerManager.toggleContent(it) },
|
||||||
isAudioContentPlaying = { mediaPlayerManager.isPlayingContent(it) },
|
isAudioContentPlaying = { mediaPlayerManager.isPlayingContent(it) },
|
||||||
onClickPurchaseContent = { postId, can, onSuccess ->
|
onClickPurchaseContent = { postId, can, onSuccess ->
|
||||||
@@ -242,6 +249,10 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
|
|||||||
itemSize = gridItemSize,
|
itemSize = gridItemSize,
|
||||||
onClickItem = {
|
onClickItem = {
|
||||||
switchToListMode(it, fromGridItemClick = true)
|
switchToListMode(it, fromGridItemClick = true)
|
||||||
|
},
|
||||||
|
onLongClickItem = { position ->
|
||||||
|
val item = gridAdapter.items.getOrNull(position) ?: return@CreatorCommunityAllGridAdapter
|
||||||
|
showCommunityOptionBottomSheet(item)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -319,6 +330,52 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showCommunityOptionBottomSheet(item: GetCommunityPostListResponse) {
|
||||||
|
val isCreator = item.creatorId == SharedPreferenceManager.userId
|
||||||
|
val isFixed = item.isFixed
|
||||||
|
|
||||||
|
val dialog = CreatorCommunityPostMenuBottomSheetDialog(
|
||||||
|
isFixed = isFixed,
|
||||||
|
isCreator = isCreator,
|
||||||
|
onClickPin = {
|
||||||
|
viewModel.updateCommunityPostFixed(item.postId, !isFixed)
|
||||||
|
},
|
||||||
|
onClickModify = {
|
||||||
|
modifyResult.launch(
|
||||||
|
Intent(
|
||||||
|
applicationContext,
|
||||||
|
CreatorCommunityModifyActivity::class.java
|
||||||
|
).apply {
|
||||||
|
putExtra(Constants.EXTRA_COMMUNITY_POST_ID, item.postId)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
onClickDelete = {
|
||||||
|
SodaDialog(
|
||||||
|
activity = this@CreatorCommunityAllActivity,
|
||||||
|
layoutInflater = layoutInflater,
|
||||||
|
title = getString(R.string.screen_creator_community_delete_title),
|
||||||
|
desc = getString(R.string.screen_creator_community_delete_desc),
|
||||||
|
confirmButtonTitle = getString(R.string.confirm_delete_title),
|
||||||
|
confirmButtonClick = {
|
||||||
|
viewModel.deleteCommunityPostList(postId = item.postId)
|
||||||
|
},
|
||||||
|
cancelButtonTitle = getString(R.string.cancel),
|
||||||
|
cancelButtonClick = {}
|
||||||
|
).show(screenWidth)
|
||||||
|
},
|
||||||
|
onClickReport = {
|
||||||
|
CreatorCommunityReportDialog(this@CreatorCommunityAllActivity, layoutInflater) {
|
||||||
|
viewModel.report(
|
||||||
|
communityPostId = item.postId,
|
||||||
|
reason = it
|
||||||
|
)
|
||||||
|
}.show(screenWidth)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
dialog.show(supportFragmentManager, dialog.tag)
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupRecyclerViews() {
|
private fun setupRecyclerViews() {
|
||||||
val listRecyclerView = binding.rvCreatorCommunity
|
val listRecyclerView = binding.rvCreatorCommunity
|
||||||
listRecyclerView.layoutManager = LinearLayoutManager(
|
listRecyclerView.layoutManager = LinearLayoutManager(
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import android.view.ViewGroup
|
|||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.widget.PopupMenu
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import coil.load
|
import coil.load
|
||||||
import coil.transform.CircleCropTransformation
|
import coil.transform.CircleCropTransformation
|
||||||
@@ -41,6 +40,7 @@ class CreatorCommunityAllAdapter(
|
|||||||
private val onClickModify: (Long) -> Unit,
|
private val onClickModify: (Long) -> Unit,
|
||||||
private val onClickDelete: (Long) -> Unit,
|
private val onClickDelete: (Long) -> Unit,
|
||||||
private val onClickReport: (Long) -> Unit,
|
private val onClickReport: (Long) -> Unit,
|
||||||
|
private val onClickToggleFixed: (postId: Long, isFixed: Boolean) -> Unit,
|
||||||
private val onClickAudioContentPlayOrPause: (CreatorCommunityContentItem) -> Unit,
|
private val onClickAudioContentPlayOrPause: (CreatorCommunityContentItem) -> Unit,
|
||||||
private val isAudioContentPlaying: (Long) -> Boolean,
|
private val isAudioContentPlaying: (Long) -> Boolean,
|
||||||
private val onClickPurchaseContent:
|
private val onClickPurchaseContent:
|
||||||
@@ -301,7 +301,7 @@ class CreatorCommunityAllAdapter(
|
|||||||
|
|
||||||
textView.setOnClickListener {
|
textView.setOnClickListener {
|
||||||
items[index] = items[index].copy(
|
items[index] = items[index].copy(
|
||||||
isExpand = !isExpand,
|
isExpand = !isExpand
|
||||||
)
|
)
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
@@ -329,34 +329,21 @@ class CreatorCommunityAllAdapter(
|
|||||||
postId: Long,
|
postId: Long,
|
||||||
creatorId: Long
|
creatorId: Long
|
||||||
) {
|
) {
|
||||||
val popup = PopupMenu(context, v)
|
val item = items.find { it.postId == postId } ?: return
|
||||||
val inflater = popup.menuInflater
|
val isCreator = creatorId == SharedPreferenceManager.userId
|
||||||
|
val isFixed = item.isFixed
|
||||||
|
|
||||||
if (creatorId == SharedPreferenceManager.userId) {
|
val dialog = CreatorCommunityPostMenuBottomSheetDialog(
|
||||||
inflater.inflate(R.menu.community_post_creator_option_menu, popup.menu)
|
isFixed = isFixed,
|
||||||
} else {
|
isCreator = isCreator,
|
||||||
inflater.inflate(R.menu.community_post_option_menu, popup.menu)
|
onClickPin = {
|
||||||
}
|
onClickToggleFixed(postId, !isFixed)
|
||||||
|
},
|
||||||
popup.setOnMenuItemClickListener {
|
onClickModify = { onClickModify(postId) },
|
||||||
when (it.itemId) {
|
onClickDelete = { onClickDelete(postId) },
|
||||||
R.id.menu_modify -> {
|
onClickReport = { onClickReport(postId) }
|
||||||
onClickModify(postId)
|
)
|
||||||
}
|
dialog.show((v.context as androidx.fragment.app.FragmentActivity).supportFragmentManager, dialog.tag)
|
||||||
|
|
||||||
R.id.menu_delete -> {
|
|
||||||
onClickDelete(postId)
|
|
||||||
}
|
|
||||||
|
|
||||||
R.id.menu_report -> {
|
|
||||||
onClickReport(postId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
popup.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ import kr.co.vividnext.sodalive.extensions.loadUrl
|
|||||||
|
|
||||||
class CreatorCommunityAllGridAdapter(
|
class CreatorCommunityAllGridAdapter(
|
||||||
private val itemSize: Int,
|
private val itemSize: Int,
|
||||||
private val onClickItem: (Int) -> Unit
|
private val onClickItem: (Int) -> Unit,
|
||||||
|
private val onLongClickItem: (Int) -> Unit
|
||||||
) : RecyclerView.Adapter<CreatorCommunityAllGridAdapter.ViewHolder>() {
|
) : RecyclerView.Adapter<CreatorCommunityAllGridAdapter.ViewHolder>() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -30,6 +31,8 @@ class CreatorCommunityAllGridAdapter(
|
|||||||
lp.height = itemSize
|
lp.height = itemSize
|
||||||
binding.root.layoutParams = lp
|
binding.root.layoutParams = lp
|
||||||
|
|
||||||
|
binding.ivPin.visibility = if (item.isFixed) View.VISIBLE else View.GONE
|
||||||
|
|
||||||
val isPaidLocked = item.price > 0 && !item.existOrdered
|
val isPaidLocked = item.price > 0 && !item.existOrdered
|
||||||
val hasImage = !item.imageUrl.isNullOrBlank()
|
val hasImage = !item.imageUrl.isNullOrBlank()
|
||||||
|
|
||||||
@@ -67,6 +70,14 @@ class CreatorCommunityAllGridAdapter(
|
|||||||
onClickItem(position)
|
onClickItem(position)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.root.setOnLongClickListener {
|
||||||
|
val position = bindingAdapterPosition
|
||||||
|
if (position != RecyclerView.NO_POSITION && !isPaidLocked) {
|
||||||
|
onLongClickItem(position)
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -282,5 +282,49 @@ class CreatorCommunityAllViewModel(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun updateCommunityPostFixed(postId: Long, isFixed: Boolean) {
|
||||||
|
if (_isLoading.value == true) return
|
||||||
|
_isLoading.value = true
|
||||||
|
|
||||||
|
compositeDisposable.add(
|
||||||
|
repository.updateCommunityPostFixed(
|
||||||
|
postId = postId,
|
||||||
|
isFixed = isFixed,
|
||||||
|
token = "Bearer ${SharedPreferenceManager.token}"
|
||||||
|
)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(
|
||||||
|
{
|
||||||
|
_isLoading.value = false
|
||||||
|
if (it.success) {
|
||||||
|
// 목록을 초기화하고 재조회하여 최신 고정 상태를 반영한다.
|
||||||
|
page = 1
|
||||||
|
isLast = false
|
||||||
|
getCommunityPostList()
|
||||||
|
} else {
|
||||||
|
if (it.message != null) {
|
||||||
|
_toastLiveData.postValue(it.message)
|
||||||
|
} else {
|
||||||
|
_toastLiveData.postValue(
|
||||||
|
SodaLiveApplicationHolder.get()
|
||||||
|
.getString(R.string.common_error_unknown)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_isLoading.value = false
|
||||||
|
it.message?.let { message -> Logger.e(message) }
|
||||||
|
_toastLiveData.postValue(
|
||||||
|
SodaLiveApplicationHolder.get()
|
||||||
|
.getString(R.string.common_error_unknown)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package kr.co.vividnext.sodalive.explorer.profile.creator_community.all
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||||
|
import kr.co.vividnext.sodalive.R
|
||||||
|
import kr.co.vividnext.sodalive.databinding.DialogCreatorCommunityPostMenuBinding
|
||||||
|
|
||||||
|
class CreatorCommunityPostMenuBottomSheetDialog(
|
||||||
|
private val isFixed: Boolean,
|
||||||
|
private val isCreator: Boolean,
|
||||||
|
private val onClickPin: () -> Unit,
|
||||||
|
private val onClickModify: () -> Unit,
|
||||||
|
private val onClickDelete: () -> Unit,
|
||||||
|
private val onClickReport: () -> Unit
|
||||||
|
) : BottomSheetDialogFragment() {
|
||||||
|
private lateinit var dialog: DialogCreatorCommunityPostMenuBinding
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
dialog = DialogCreatorCommunityPostMenuBinding.inflate(inflater, container, false)
|
||||||
|
return dialog.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
if (isCreator) {
|
||||||
|
dialog.tvReport.visibility = View.GONE
|
||||||
|
dialog.llMenuCreator.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
if (isFixed) {
|
||||||
|
dialog.ivPin.setImageResource(R.drawable.ic_pin_cancel)
|
||||||
|
dialog.tvPin.text = getString(R.string.screen_creator_community_unpin)
|
||||||
|
} else {
|
||||||
|
dialog.ivPin.setImageResource(R.drawable.ic_pin)
|
||||||
|
dialog.tvPin.text = getString(R.string.screen_creator_community_pin)
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.llPin.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickPin()
|
||||||
|
}
|
||||||
|
dialog.llModify.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickModify()
|
||||||
|
}
|
||||||
|
dialog.llDelete.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickDelete()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dialog.llMenuCreator.visibility = View.GONE
|
||||||
|
dialog.tvReport.visibility = View.VISIBLE
|
||||||
|
dialog.tvReport.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
onClickReport()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package kr.co.vividnext.sodalive.explorer.profile.creator_community.all
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class UpdateCommunityPostFixedRequest(
|
||||||
|
@SerializedName("postId") val postId: Long,
|
||||||
|
@SerializedName("isFixed") val isFixed: Boolean
|
||||||
|
)
|
||||||
@@ -14,7 +14,7 @@ class UserProfileDonationAdapter : RecyclerView.Adapter<UserProfileDonationAdapt
|
|||||||
|
|
||||||
val items = mutableListOf<UserDonationRankingResponse>()
|
val items = mutableListOf<UserDonationRankingResponse>()
|
||||||
|
|
||||||
inner class ViewHolder(
|
class ViewHolder(
|
||||||
private val binding: ItemUserProfileDonationBinding
|
private val binding: ItemUserProfileDonationBinding
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
fun bind(item: UserDonationRankingResponse, position: Int) {
|
fun bind(item: UserDonationRankingResponse, position: Int) {
|
||||||
@@ -28,32 +28,21 @@ class UserProfileDonationAdapter : RecyclerView.Adapter<UserProfileDonationAdapt
|
|||||||
|
|
||||||
when (position) {
|
when (position) {
|
||||||
0 -> {
|
0 -> {
|
||||||
binding.ivBg.setImageResource(R.drawable.bg_circle_ffdc00_ffb600)
|
binding.ivCrown.setImageResource(R.drawable.img_rank_1)
|
||||||
binding.ivBg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
binding.ivCrown.setImageResource(R.drawable.ic_crown_1)
|
|
||||||
binding.ivCrown.visibility = View.VISIBLE
|
binding.ivCrown.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
binding.ivBg.setImageResource(R.drawable.bg_circle_ffffff_9f9f9f)
|
binding.ivCrown.setImageResource(R.drawable.img_rank_2)
|
||||||
binding.ivBg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
binding.ivCrown.setImageResource(R.drawable.ic_crown_2)
|
|
||||||
binding.ivCrown.visibility = View.VISIBLE
|
binding.ivCrown.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
binding.ivBg.setImageResource(R.drawable.bg_circle_e6a77a_c67e4a)
|
binding.ivCrown.setImageResource(R.drawable.img_rank_3)
|
||||||
binding.ivBg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
binding.ivCrown.setImageResource(R.drawable.ic_crown_3)
|
|
||||||
binding.ivCrown.visibility = View.VISIBLE
|
binding.ivCrown.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
binding.ivBg.setImageResource(0)
|
|
||||||
binding.ivBg.visibility = View.GONE
|
|
||||||
binding.ivCrown.visibility = View.GONE
|
binding.ivCrown.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,10 +50,7 @@ class UserProfileDonationAllAdapter(private val userId: Long) :
|
|||||||
|
|
||||||
when (position) {
|
when (position) {
|
||||||
0 -> {
|
0 -> {
|
||||||
binding.ivBg.setImageResource(R.drawable.bg_circle_ffdc00_ffb600)
|
binding.ivCrown.setImageResource(R.drawable.img_rank_1)
|
||||||
binding.ivBg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
binding.ivCrown.setImageResource(R.drawable.ic_crown_1)
|
|
||||||
binding.ivCrown.visibility = View.VISIBLE
|
binding.ivCrown.visibility = View.VISIBLE
|
||||||
binding.rlDonationRankingRoot.setBackgroundResource(
|
binding.rlDonationRankingRoot.setBackgroundResource(
|
||||||
if (items.size == 1) {
|
if (items.size == 1) {
|
||||||
@@ -77,10 +74,7 @@ class UserProfileDonationAllAdapter(private val userId: Long) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
binding.ivBg.setImageResource(R.drawable.bg_circle_ffffff_9f9f9f)
|
binding.ivCrown.setImageResource(R.drawable.img_rank_2)
|
||||||
binding.ivBg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
binding.ivCrown.setImageResource(R.drawable.ic_crown_2)
|
|
||||||
binding.ivCrown.visibility = View.VISIBLE
|
binding.ivCrown.visibility = View.VISIBLE
|
||||||
|
|
||||||
if (items.size == 2) {
|
if (items.size == 2) {
|
||||||
@@ -107,10 +101,7 @@ class UserProfileDonationAllAdapter(private val userId: Long) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
binding.ivBg.setImageResource(R.drawable.bg_circle_e6a77a_c67e4a)
|
binding.ivCrown.setImageResource(R.drawable.img_rank_3)
|
||||||
binding.ivBg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
binding.ivCrown.setImageResource(R.drawable.ic_crown_3)
|
|
||||||
binding.ivCrown.visibility = View.VISIBLE
|
binding.ivCrown.visibility = View.VISIBLE
|
||||||
binding.rlDonationRankingRoot.setBackgroundResource(
|
binding.rlDonationRankingRoot.setBackgroundResource(
|
||||||
R.drawable.bg_bottom_round_corner_4_7_13181b
|
R.drawable.bg_bottom_round_corner_4_7_13181b
|
||||||
@@ -126,8 +117,6 @@ class UserProfileDonationAllAdapter(private val userId: Long) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
binding.ivBg.setImageResource(0)
|
|
||||||
binding.ivBg.visibility = View.GONE
|
|
||||||
binding.ivCrown.visibility = View.GONE
|
binding.ivCrown.visibility = View.GONE
|
||||||
binding.rlDonationRanking.setBackgroundResource(0)
|
binding.rlDonationRanking.setBackgroundResource(0)
|
||||||
binding.rlDonationRanking.background = null
|
binding.rlDonationRanking.background = null
|
||||||
|
|||||||
110
app/src/main/res/layout/dialog_creator_community_post_menu.xml
Normal file
110
app/src/main/res/layout/dialog_creator_community_post_menu.xml
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingVertical="25dp"
|
||||||
|
tools:background="@color/black">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_menu_creator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="21dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_pin"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingVertical="8dp"
|
||||||
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_pin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_pin" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_pin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13.3dp"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/screen_creator_community_pin"
|
||||||
|
android:textColor="@color/color_e2e2e2"
|
||||||
|
android:textSize="14.7sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_modify"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingVertical="8dp"
|
||||||
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_make_message" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13.3dp"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/screen_audio_content_detail_edit"
|
||||||
|
android:textColor="@color/color_e2e2e2"
|
||||||
|
android:textSize="14.7sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_delete"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingVertical="8dp"
|
||||||
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_trash_can" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13.3dp"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/screen_audio_content_detail_delete"
|
||||||
|
android:textColor="@color/color_e2e2e2"
|
||||||
|
android:textSize="14.7sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_report"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/medium"
|
||||||
|
android:paddingHorizontal="21.3dp"
|
||||||
|
android:paddingVertical="8dp"
|
||||||
|
android:text="@string/screen_audio_content_detail_report"
|
||||||
|
android:textColor="@color/color_e2e2e2"
|
||||||
|
android:textSize="14.7sp" />
|
||||||
|
</LinearLayout>
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:text="3일전" />
|
tools:text="3일전" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
tools:text="3시간전" />
|
tools:text="3시간전" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_see_more"
|
android:id="@+id/iv_see_more"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_round_corner_5_3_263238"
|
android:background="@drawable/bg_round_corner_5_3_263238"
|
||||||
android:clipToOutline="true"
|
|
||||||
android:outlineProvider="background">
|
android:outlineProvider="background">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -38,4 +37,15 @@
|
|||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/ic_lock_bb"
|
android:src="@drawable/ic_lock_bb"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_pin"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_pin"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -1,20 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="76dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="76dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="76dp">
|
android:layout_height="87.5dp">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_bg"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:contentDescription="@null" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_profile"
|
android:id="@+id/iv_profile"
|
||||||
@@ -26,10 +20,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_crown"
|
android:id="@+id/iv_crown"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_gravity="center"
|
||||||
android:contentDescription="@null" />
|
android:contentDescription="@null" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -13,16 +13,10 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl_profile"
|
android:id="@+id/rl_profile"
|
||||||
android:layout_width="65dp"
|
android:layout_width="77dp"
|
||||||
android:layout_height="65dp"
|
android:layout_height="75dp"
|
||||||
android:layout_centerVertical="true">
|
android:layout_centerVertical="true">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_bg"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:contentDescription="@null" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_profile"
|
android:id="@+id/iv_profile"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
@@ -33,10 +27,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_crown"
|
android:id="@+id/iv_crown"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_gravity="center"
|
||||||
android:contentDescription="@null" />
|
android:contentDescription="@null" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,10 @@
|
|||||||
<string name="confirm">Confirm</string>
|
<string name="confirm">Confirm</string>
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
|
|
||||||
|
<!-- Creator community - pin/fixed menu -->
|
||||||
|
<string name="screen_creator_community_pin">Pin to top</string>
|
||||||
|
<string name="screen_creator_community_unpin">Unpin</string>
|
||||||
|
|
||||||
<!-- Settings - Language -->
|
<!-- Settings - Language -->
|
||||||
<string name="screen_settings_language">Language</string>
|
<string name="screen_settings_language">Language</string>
|
||||||
<string name="settings_language_korean">Korean</string>
|
<string name="settings_language_korean">Korean</string>
|
||||||
|
|||||||
@@ -87,6 +87,10 @@
|
|||||||
<string name="confirm">確認</string>
|
<string name="confirm">確認</string>
|
||||||
<string name="cancel">キャンセル</string>
|
<string name="cancel">キャンセル</string>
|
||||||
|
|
||||||
|
<!-- Creator community - pin/fixed menu -->
|
||||||
|
<string name="screen_creator_community_pin">最上部に固定</string>
|
||||||
|
<string name="screen_creator_community_unpin">固定を解除</string>
|
||||||
|
|
||||||
<!-- Settings - Language -->
|
<!-- Settings - Language -->
|
||||||
<string name="screen_settings_language">言語設定</string>
|
<string name="screen_settings_language">言語設定</string>
|
||||||
<string name="settings_language_korean">韓国語</string>
|
<string name="settings_language_korean">韓国語</string>
|
||||||
|
|||||||
@@ -86,6 +86,10 @@
|
|||||||
<string name="confirm">확인</string>
|
<string name="confirm">확인</string>
|
||||||
<string name="cancel">취소</string>
|
<string name="cancel">취소</string>
|
||||||
|
|
||||||
|
<!-- Creator community - pin/fixed menu -->
|
||||||
|
<string name="screen_creator_community_pin">최상단에 고정</string>
|
||||||
|
<string name="screen_creator_community_unpin">고정 해제</string>
|
||||||
|
|
||||||
<!-- Settings - Language -->
|
<!-- Settings - Language -->
|
||||||
<string name="screen_settings_language">언어 설정</string>
|
<string name="screen_settings_language">언어 설정</string>
|
||||||
<string name="settings_language_korean">한국어</string>
|
<string name="settings_language_korean">한국어</string>
|
||||||
|
|||||||
14
docs/20260316_그리드_유료게시물_보조메뉴_제한.md
Normal file
14
docs/20260316_그리드_유료게시물_보조메뉴_제한.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# 20260316_그리드_유료게시물_보조메뉴_제한.md
|
||||||
|
|
||||||
|
## 개요
|
||||||
|
그리드 모드에서 유료 게시물 중 구매하지 않은 게시물에 대해 롱클릭 시 보조 메뉴가 표시되지 않도록 수정한다.
|
||||||
|
|
||||||
|
## 작업 내용
|
||||||
|
- [x] CreatorCommunityAllGridAdapter.kt 수정: `isPaidLocked`가 `true`일 때 롱클릭 리스너를 무시하도록 처리.
|
||||||
|
|
||||||
|
## 검증 기록
|
||||||
|
- 무엇을: 그리드 모드 유료/미구매 게시물 롱클릭 시 보조 메뉴 노출 여부 확인
|
||||||
|
- 왜: 유료 게시물을 구매하기 전에는 보조 메뉴(고정/해제, 수정, 삭제 등)가 노출되지 않아야 함
|
||||||
|
- 어떻게: `CreatorCommunityAllGridAdapter`의 `isPaidLocked` 조건 확인 및 롱클릭 리스너 수정
|
||||||
|
- 실행 명령: `./gradlew :app:assembleDebug`
|
||||||
|
- 결과: `./gradlew :app:assembleDebug` 성공. `isPaidLocked`일 때 롱클릭 리스너 내 조건 처리가 정상적으로 추가됨.
|
||||||
22
docs/20260316_커뮤니티_고정게시물_핀표시_그리드전용_수정.md
Normal file
22
docs/20260316_커뮤니티_고정게시물_핀표시_그리드전용_수정.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# 20260316_커뮤니티_고정게시물_핀표시_그리드전용_수정.md
|
||||||
|
|
||||||
|
## 개요
|
||||||
|
- 커뮤니티 게시물 고정 기능을 리스트 형태와 그리드 형태 모두에 적용했으나, 요구사항 변경에 따라 리스트 형태에서는 핀 아이콘을 제거하고 그리드 형태에서만 표시하도록 수정한다.
|
||||||
|
|
||||||
|
## 작업 내용
|
||||||
|
- [x] `item_creator_community_all.xml` (리스트 아이템)에서 `iv_pin` 제거
|
||||||
|
- [x] `item_creator_community.xml` (리스트 아이템)에서 `iv_pin` 제거
|
||||||
|
- [x] `CreatorCommunityAllAdapter.kt` (리스트 어댑터)에서 `iv_pin` 표시 로직 제거
|
||||||
|
- [x] `CreatorCommunityAdapter.kt` (리스트 어댑터)에서 `iv_pin` 표시 로직 제거
|
||||||
|
- [x] 빌드 및 린트 체크 (`./gradlew :app:assembleDebug`, `./gradlew :app:ktlintCheck`)
|
||||||
|
|
||||||
|
## 검증 기록
|
||||||
|
- 무엇을: 리스트 형태에서 고정 핀 아이콘 노출 여부 확인
|
||||||
|
- 왜: 요구사항에 따라 그리드 형태에서만 핀을 노출하기 위함
|
||||||
|
- 어떻게: 코드 수정 후 빌드 성공 여부 및 린트 확인
|
||||||
|
- 결과:
|
||||||
|
- 리스트 형태 아이템 레이아웃에서 `iv_pin` 뷰를 삭제함.
|
||||||
|
- 리스트 어댑터들에서 `iv_pin`을 참조하거나 가시성을 변경하는 코드를 삭제함.
|
||||||
|
- 그리드 형태(`item_creator_community_all_grid.xml`, `CreatorCommunityAllGridAdapter.kt`)는 기존대로 유지하여 핀 아이콘이 노출되도록 함.
|
||||||
|
- `./gradlew :app:assembleDebug` 성공.
|
||||||
|
- `./gradlew :app:ktlintCheck` 결과, 패키지명 규칙 외의 다른 스타일 위반 사항(빈 줄, 후행 쉼표 등)을 수정 완료함.
|
||||||
39
docs/20260317_프로필후원순위왕관UI동일화.md
Normal file
39
docs/20260317_프로필후원순위왕관UI동일화.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# 20260317_프로필후원순위왕관UI동일화.md
|
||||||
|
|
||||||
|
## 개요
|
||||||
|
- `UserProfileDonationAdapter`의 순위 왕관 표시 UI를 `CreatorRankingAdapter`의 랭킹 배지 UI와 동일한 리소스/표시 방식으로 맞춘다.
|
||||||
|
|
||||||
|
## 작업 내용
|
||||||
|
- [x] `UserProfileDonationAdapter.kt`의 순위 UI 로직을 `img_rank_1`, `img_rank_2`, `img_rank_3` 기반으로 변경
|
||||||
|
- [x] 기존 원형 배경(`iv_bg`) 및 왕관 아이콘(`ic_crown_*`) 노출 로직 제거
|
||||||
|
- [x] `item_user_profile_donation.xml`에서 `iv_crown` 위치를 중앙 고정으로 변경
|
||||||
|
- [x] `item_user_profile_donation.xml`에서 `iv_crown` 크기를 `match_parent`로 조정하고 `fitCenter` 적용
|
||||||
|
- [x] `UserProfileDonationAdapter.kt`에서 런타임 `LayoutParams` 위치 세팅 코드 제거
|
||||||
|
- [x] 검증 수행 (`lsp_diagnostics`, `./gradlew :app:testDebugUnitTest`, `./gradlew :app:assembleDebug`)
|
||||||
|
|
||||||
|
## 검증 기록
|
||||||
|
- 무엇을: 유저 프로필 후원 랭킹의 상위 3위 왕관 표시 UI를 홈 크리에이터 랭킹 배지와 동일 리소스로 변경
|
||||||
|
- 왜: 화면 간 순위 표현의 일관성을 맞추기 위함
|
||||||
|
- 어떻게:
|
||||||
|
- `UserProfileDonationAdapter.kt`에서 상위 3위 리소스를 `img_rank_1~3`로 교체
|
||||||
|
- `iv_bg`는 항상 `GONE` 처리하고 `iv_crown`을 중앙 정렬하여 배지 오버레이 방식으로 통일
|
||||||
|
- `lsp_diagnostics` 시도(현재 환경은 Kotlin LSP 미구성), Gradle 테스트/빌드로 컴파일 및 동작 가능 여부 확인
|
||||||
|
- 결과:
|
||||||
|
- `app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt` 반영 완료
|
||||||
|
- `./gradlew :app:testDebugUnitTest` 성공
|
||||||
|
- `./gradlew :app:assembleDebug` 성공
|
||||||
|
- LSP 진단은 `.kt` 서버 미설정으로 미실행(대신 Gradle 검증으로 대체)
|
||||||
|
|
||||||
|
### 추가 수정 (왕관 위치/크기)
|
||||||
|
- 무엇을: 왕관 배지의 위치를 XML 고정으로 전환하고 배지 크기를 조정
|
||||||
|
- 왜: 바인딩마다 위치를 재설정하는 중복 코드를 제거하고, 프로필 이미지가 배지 밖으로 보이는 문제를 방지하기 위함
|
||||||
|
- 어떻게:
|
||||||
|
- `item_user_profile_donation.xml`의 `iv_crown`을 `layout_centerInParent="true"`, `layout_width/height="match_parent"`, `scaleType="fitCenter"`로 수정
|
||||||
|
- `UserProfileDonationAdapter.kt`에서 `RelativeLayout.LayoutParams`를 조작하던 코드와 import 제거
|
||||||
|
- `lsp_diagnostics` 재시도(현재 환경은 `.kt`, `.xml` LSP 미구성), Gradle 테스트/빌드 재검증
|
||||||
|
- 결과:
|
||||||
|
- `app/src/main/res/layout/item_user_profile_donation.xml` 반영 완료
|
||||||
|
- `app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt` 반영 완료
|
||||||
|
- `./gradlew :app:testDebugUnitTest` 성공
|
||||||
|
- `./gradlew :app:assembleDebug` 성공
|
||||||
|
- LSP 진단은 `.kt`, `.xml` 서버 미설정으로 미실행(대신 Gradle 검증으로 대체)
|
||||||
Reference in New Issue
Block a user