Skip to content

Commit

Permalink
fix: fix typo (postList -> myPostList)
Browse files Browse the repository at this point in the history
  • Loading branch information
peng-u-0807 committed Nov 28, 2023
1 parent 9de9458 commit 3bae6eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -112,7 +108,7 @@ fun ProfilePage(

ProfileMenuCellWithPreview(
label = "내가 작성한 포스트",
detailLabel = "count",
detailLabel = myPostList.itemCount.toString(),
navigateToDestination = { navController.navigate(NavigationDestination.MyPostList) }
) {
items(myPostList.itemCount) { index ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bae6eb

Please sign in to comment.