diff --git a/android/app/src/main/java/com/goliath/emojihub/data_sources/PostPagingSource.kt b/android/app/src/main/java/com/goliath/emojihub/data_sources/PostPagingSource.kt index 87799694..8f4fcf2c 100644 --- a/android/app/src/main/java/com/goliath/emojihub/data_sources/PostPagingSource.kt +++ b/android/app/src/main/java/com/goliath/emojihub/data_sources/PostPagingSource.kt @@ -22,7 +22,7 @@ class PostPagingSource @Inject constructor( api.fetchPostList(cursor).body() } PostFetchType.MY -> { - api.fetchPostList(cursor).body() + api.fetchMyPostList(cursor).body() } } val data = response ?: listOf() diff --git a/android/app/src/main/java/com/goliath/emojihub/usecases/PostUseCase.kt b/android/app/src/main/java/com/goliath/emojihub/usecases/PostUseCase.kt index df15b324..83fe79b7 100644 --- a/android/app/src/main/java/com/goliath/emojihub/usecases/PostUseCase.kt +++ b/android/app/src/main/java/com/goliath/emojihub/usecases/PostUseCase.kt @@ -25,6 +25,7 @@ sealed interface PostUseCase { suspend fun editPost(id: String, content: String) suspend fun deletePost(id: String) } + class PostUseCaseImpl @Inject constructor( private val repository: PostRepository, private val errorController: ApiErrorController diff --git a/android/app/src/main/java/com/goliath/emojihub/views/ProfilePage.kt b/android/app/src/main/java/com/goliath/emojihub/views/ProfilePage.kt index a099fa90..82662fdf 100644 --- a/android/app/src/main/java/com/goliath/emojihub/views/ProfilePage.kt +++ b/android/app/src/main/java/com/goliath/emojihub/views/ProfilePage.kt @@ -65,20 +65,16 @@ fun ProfilePage( var showSignOutDialog by remember { mutableStateOf(false) } LaunchedEffect(Unit) { - postViewModel.fetchPostList() + postViewModel.fetchMyPostList() emojiViewModel.fetchMyCreatedEmojiList() emojiViewModel.fetchMySavedEmojiList() } - LazyColumn( - Modifier.background(White) - ) { + LazyColumn(Modifier.background(White)) { item { TopNavigationBar("Profile", shouldNavigate = false) - Box( - modifier = Modifier.fillMaxSize() - ) { + Box(modifier = Modifier.fillMaxSize()) { if (currentUser?.accessToken.isNullOrEmpty()) { EmptyProfile() } else { @@ -112,7 +108,7 @@ fun ProfilePage( ProfileMenuCellWithPreview( label = "내가 작성한 포스트", - detailLabel = "count", + detailLabel = myPostList.itemCount.toString(), navigateToDestination = { navController.navigate(NavigationDestination.MyPostList) } ) { items(myPostList.itemCount) { index -> diff --git a/android/app/src/main/java/com/goliath/emojihub/views/components/PreviewPostCell.kt b/android/app/src/main/java/com/goliath/emojihub/views/components/PreviewPostCell.kt index d49773ab..33bd47be 100644 --- a/android/app/src/main/java/com/goliath/emojihub/views/components/PreviewPostCell.kt +++ b/android/app/src/main/java/com/goliath/emojihub/views/components/PreviewPostCell.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.border import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width