Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX/#171] 스크랩 오류 수정 #172

Merged
merged 1 commit into from
Jul 19, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
Expand Down Expand Up @@ -52,6 +53,7 @@ import com.terning.feature.intern.component.InternInfoRow
fun HomeRecommendInternDialog(
internInfoList: List<Pair<String, String>>,
clickAction: () -> Unit,
onColorSelected:(Color) -> Unit = {},
homeRecommendInternModel: HomeRecommendInternModel,
viewModel: HomeViewModel = hiltViewModel(),
) {
Expand Down Expand Up @@ -171,6 +173,7 @@ fun HomeRecommendInternDialog(
initialColor = CalRed,
onColorSelected = { newColor ->
viewModel.updateSelectColor(newColor)
onColorSelected(newColor)
}
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.terning.feature.search.searchprocess

import android.util.Log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로그 사용 안하면 지워주세요!!

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -352,12 +353,14 @@ fun SearchProcessScreen(
)
viewModel.updateColorChange(false)
} else {
viewModel.postScrap(internshipAnnouncementId, 0)

viewModel.postScrap(internshipAnnouncementId, colorList.indexOf(dialogState.selectedColor))
}
viewModel.updateScrapDialogVisible(false)
}
},
onColorSelected = { newColor ->
viewModel.updateSelectColor(newColor)
},
homeRecommendInternModel = HomeRecommendInternModel(
scrapId = scrapId,
internshipAnnouncementId = internshipAnnouncementId,
Expand Down
Loading