fix(home): 커뮤니티 상세 이동을 연결한다
This commit is contained in:
@@ -6,14 +6,12 @@ import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.base.BaseFragment
|
||||
import kr.co.vividnext.sodalive.common.Constants
|
||||
import kr.co.vividnext.sodalive.common.LoadingDialog
|
||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||
import kr.co.vividnext.sodalive.common.ToastMessage
|
||||
import kr.co.vividnext.sodalive.common.formatUtcRelativeTimeText
|
||||
import kr.co.vividnext.sodalive.databinding.FragmentV2MainHomeBinding
|
||||
import kr.co.vividnext.sodalive.databinding.ViewSectionTitleBinding
|
||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.CreatorCommunityAllActivity
|
||||
import kr.co.vividnext.sodalive.following.FollowingCreatorActivity
|
||||
import kr.co.vividnext.sodalive.chat.talk.room.ChatRoomActivity
|
||||
import kr.co.vividnext.sodalive.home.pushnotification.PushNotificationListActivity
|
||||
@@ -22,6 +20,7 @@ import kr.co.vividnext.sodalive.mypage.can.charge.CanChargeActivity
|
||||
import kr.co.vividnext.sodalive.search.SearchActivity
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelActivity
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelLiveCoordinator
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.community.detail.CreatorChannelCommunityDetailActivity
|
||||
import kr.co.vividnext.sodalive.v2.live.onair.HomeOnAirLiveActivity
|
||||
import kr.co.vividnext.sodalive.v2.main.chat.dm.DmChatRoomActivity
|
||||
import kr.co.vividnext.sodalive.v2.main.chat.model.ChatRoomListUiItem
|
||||
@@ -617,16 +616,9 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
|
||||
}
|
||||
|
||||
private fun openPopularCommunityPost(item: FeedItem.Community) {
|
||||
val creatorId = item.creatorId.toLongOrNull() ?: return
|
||||
val postId = item.postId.toLongOrNull() ?: return
|
||||
ensureMainV2NavigationAllowed {
|
||||
startActivity(
|
||||
Intent(requireContext(), CreatorCommunityAllActivity::class.java).apply {
|
||||
putExtra(Constants.EXTRA_COMMUNITY_CREATOR_ID, creatorId)
|
||||
putExtra(Constants.EXTRA_COMMUNITY_POST_ID, postId)
|
||||
putExtra(Constants.EXTRA_COMMUNITY_EXIST_ORDERED, item.existOrdered)
|
||||
}
|
||||
)
|
||||
startActivity(CreatorChannelCommunityDetailActivity.newIntent(requireContext(), postId))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-7
@@ -7,11 +7,11 @@ import kr.co.vividnext.sodalive.BuildConfig
|
||||
import kr.co.vividnext.sodalive.audio_content.detail.AudioContentDetailActivity
|
||||
import kr.co.vividnext.sodalive.audio_content.series.detail.SeriesDetailActivity
|
||||
import kr.co.vividnext.sodalive.common.Constants
|
||||
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.CreatorCommunityAllActivity
|
||||
import kr.co.vividnext.sodalive.settings.event.EventDetailActivity
|
||||
import kr.co.vividnext.sodalive.settings.event.EventItem
|
||||
import kr.co.vividnext.sodalive.v2.common.CreatorActivityType
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelActivity
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.community.detail.CreatorChannelCommunityDetailActivity
|
||||
import kr.co.vividnext.sodalive.v2.widget.characterchatthumbnail.CharacterChatThumbnailItem
|
||||
import kr.co.vividnext.sodalive.v2.widget.feed.FeedItem
|
||||
import java.util.Locale
|
||||
@@ -136,7 +136,7 @@ data class HomeRecommendationRecentlyActiveCreatorUiModel(
|
||||
sealed interface HomeRecommendationRecentlyActiveCreatorRoute {
|
||||
data class AudioContent(val contentId: Long) : HomeRecommendationRecentlyActiveCreatorRoute
|
||||
|
||||
data class Community(val creatorId: Long) : HomeRecommendationRecentlyActiveCreatorRoute
|
||||
data class Community(val postId: Long) : HomeRecommendationRecentlyActiveCreatorRoute
|
||||
}
|
||||
|
||||
fun HomeRecommendationRecentlyActiveCreatorUiModel.toHomeRecommendationRecentlyActiveCreatorRoute():
|
||||
@@ -160,11 +160,8 @@ fun HomeRecommendationRecentlyActiveCreatorRoute.toHomeRecommendationRecentlyAct
|
||||
}
|
||||
}
|
||||
|
||||
is HomeRecommendationRecentlyActiveCreatorRoute.Community -> {
|
||||
Intent(context, CreatorCommunityAllActivity::class.java).apply {
|
||||
putExtra(Constants.EXTRA_COMMUNITY_CREATOR_ID, creatorId)
|
||||
}
|
||||
}
|
||||
is HomeRecommendationRecentlyActiveCreatorRoute.Community ->
|
||||
CreatorChannelCommunityDetailActivity.newIntent(context, postId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user