Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ android {
}
}

// 룸 디비 제거
// 좋아요 기능 좀더 생각해보기

dependencies {
// 프로젝트 의존성
implementation(projects.core.resource)
Expand Down Expand Up @@ -131,7 +128,7 @@ dependencies {
// UI 관련 유틸 라이브러리
implementation(libs.dots.indicator) // ViewPager2 indicator
implementation(libs.lottie) // Lottie 애니메이션
implementation(libs.pull.to.refresh) // Pull 새로고침
implementation(libs.swipe.refresh.layout) // Pull 새로고침

// Third-party SDK
implementation(libs.kakao) // 카카오 로그인 API
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
android:name=".ui.novelRating.NovelRatingActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.detailExplore.DetailExploreActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.detailExploreResult.DetailExploreResultActivity"
android:exported="false"
Expand Down
19 changes: 0 additions & 19 deletions app/src/main/java/com/into/websoso/data/mapper/FeedMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import com.into.websoso.data.model.FeedDetailEntity.UserEntity
import com.into.websoso.data.model.FeedEntity
import com.into.websoso.data.model.FeedsEntity
import com.into.websoso.data.model.PopularFeedsEntity
import com.into.websoso.data.model.UserInterestFeedsEntity
import com.into.websoso.data.remote.response.CommentResponseDto
import com.into.websoso.data.remote.response.CommentsResponseDto
import com.into.websoso.data.remote.response.FeedDetailResponseDto
import com.into.websoso.data.remote.response.FeedResponseDto
import com.into.websoso.data.remote.response.FeedsResponseDto
import com.into.websoso.data.remote.response.PopularFeedsResponseDto
import com.into.websoso.data.remote.response.UserInterestFeedsResponseDto

fun FeedsResponseDto.toData(): FeedsEntity =
FeedsEntity(
Expand Down Expand Up @@ -120,20 +118,3 @@ fun PopularFeedsResponseDto.toData(): PopularFeedsEntity =
)
},
)

fun UserInterestFeedsResponseDto.toData(): UserInterestFeedsEntity =
UserInterestFeedsEntity(
userInterestFeeds = userInterestFeeds.map { feed ->
UserInterestFeedsEntity.UserInterestFeedEntity(
avatarImage = feed.avatarImage,
feedContent = feed.feedContent,
nickname = feed.nickname,
novelId = feed.novelId,
novelImage = feed.novelImage,
novelRating = feed.novelRating,
novelRatingCount = feed.novelRatingCount,
novelTitle = feed.novelTitle,
)
},
message = message,
)

This file was deleted.

4 changes: 0 additions & 4 deletions app/src/main/java/com/into/websoso/data/remote/api/FeedApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.into.websoso.data.remote.response.CommentsResponseDto
import com.into.websoso.data.remote.response.FeedDetailResponseDto
import com.into.websoso.data.remote.response.FeedsResponseDto
import com.into.websoso.data.remote.response.PopularFeedsResponseDto
import com.into.websoso.data.remote.response.UserInterestFeedsResponseDto
import okhttp3.MultipartBody
import retrofit2.http.Body
import retrofit2.http.DELETE
Expand Down Expand Up @@ -47,9 +46,6 @@ interface FeedApi {
@GET("feeds/popular")
suspend fun getPopularFeeds(): PopularFeedsResponseDto

@GET("feeds/interest")
suspend fun getUserInterestFeeds(): UserInterestFeedsResponseDto

@DELETE("feeds/{feedId}")
suspend fun deleteFeed(
@Path("feedId") feedId: Long,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.into.websoso.data.repository

import com.into.websoso.data.mapper.MultiPartMapper
import com.into.websoso.data.mapper.toData
import com.into.websoso.data.model.FeedEntity
import com.into.websoso.data.model.FeedsEntity
import com.into.websoso.data.model.PopularFeedsEntity
import com.into.websoso.data.model.UserInterestFeedsEntity
import com.into.websoso.data.remote.api.FeedApi
import javax.inject.Inject
import javax.inject.Singleton
Expand Down Expand Up @@ -37,8 +35,6 @@ class FeedRepository

suspend fun fetchPopularFeeds(): PopularFeedsEntity = feedApi.getPopularFeeds().toData()

suspend fun fetchUserInterestFeeds(): UserInterestFeedsEntity = feedApi.getUserInterestFeeds().toData()

suspend fun saveRemovedFeed(feedId: Long) {
runCatching {
feedApi.deleteFeed(feedId)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package com.into.websoso.ui.detailExplore

import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import com.into.websoso.core.common.util.setupSystemBarIconColor
import com.into.websoso.core.designsystem.theme.WebsosoTheme
import com.into.websoso.core.resource.R.string.inquire_link
import com.into.websoso.ui.detailExploreResult.DetailExploreResultActivity
import com.into.websoso.ui.detailExploreResult.model.DetailExploreFilteredModel
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class DetailExploreActivity : AppCompatActivity() {
private val detailExploreViewModel: DetailExploreViewModel by viewModels()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setupSystemBarIconColor(true)

setContent {
WebsosoTheme {
DetailExploreScreen(
viewModel = detailExploreViewModel,
onBackClick = ::finish,
onSearchClick = ::navigateToSearchResult,
onKeywordInquireClick = ::navigateToKeywordInquire,
)
}
}
}

private fun navigateToSearchResult() {
val selectedGenres = detailExploreViewModel.selectedGenres.value ?: emptyList()
val isCompleted = detailExploreViewModel.selectedStatus.value?.isCompleted
val novelRating = detailExploreViewModel.selectedRating.value

val keywordIds = detailExploreViewModel.uiState.value
?.categories
?.flatMap { it.keywords.asSequence() }
?.filter { it.isSelected }
?.map { it.keywordId }
?.toList() ?: emptyList()

startActivity(
DetailExploreResultActivity.getIntent(
context = this,
detailExploreFilteredModel = DetailExploreFilteredModel(
genres = selectedGenres,
isCompleted = isCompleted,
novelRating = novelRating,
keywordIds = keywordIds,
),
),
)
}

private fun navigateToKeywordInquire() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(getString(inquire_link)))
startActivity(intent)
}

companion object {
fun getIntent(context: Context): Intent = Intent(context, DetailExploreActivity::class.java)
}
}

This file was deleted.

Loading
Loading