-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220 from hellokitty-coding-club/feat/suggestion-d…
…etail [FEAT] 미션 제안 상세 화면 기능 구현 마무리 (#219)
- Loading branch information
Showing
20 changed files
with
598 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...src/main/java/com/lgtm/android/common_ui/components/dropdown/SuggestionDropDownOneMenu.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.lgtm.android.common_ui.components.dropdown | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.border | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.DropdownMenu | ||
import androidx.compose.material.DropdownMenuItem | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import com.lgtm.android.common_ui.theme.LGTMTheme | ||
|
||
@Composable | ||
fun SuggestionDropDownOneMenu( | ||
isExpanded: Boolean, | ||
text: String, | ||
onDismissRequest: () -> Unit, | ||
onMenuClick: () -> Unit | ||
) { | ||
MaterialTheme(shapes = MaterialTheme.shapes.copy(medium = RoundedCornerShape(10.dp))) { | ||
DropdownMenu( | ||
modifier = Modifier | ||
.background( | ||
color = LGTMTheme.colors.white | ||
) | ||
.border( | ||
width = 1.dp, | ||
color = LGTMTheme.colors.gray_2, | ||
shape = RoundedCornerShape(10.dp) | ||
), | ||
expanded = isExpanded, | ||
onDismissRequest = onDismissRequest | ||
) { | ||
DropdownMenuItem( | ||
onClick = { | ||
onDismissRequest() | ||
onMenuClick() | ||
} | ||
) { | ||
Text( | ||
text = text, | ||
style = LGTMTheme.typography.body2, | ||
color = LGTMTheme.colors.black | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
data/src/main/java/com/lgtm/android/data/model/response/DeleteSuggestionDTO.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.lgtm.android.data.model.response | ||
|
||
import com.lgtm.domain.entity.response.DeleteSuggestionVO | ||
|
||
data class DeleteSuggestionDTO( | ||
val suggestionId: Int?, | ||
val success: Boolean? | ||
) { | ||
fun toVO() = DeleteSuggestionVO( | ||
suggestionId = suggestionId ?: 0, | ||
success = success ?: false | ||
) | ||
} |
13 changes: 13 additions & 0 deletions
13
data/src/main/java/com/lgtm/android/data/model/response/SuggestionLikeDTO.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.lgtm.android.data.model.response | ||
|
||
import com.lgtm.domain.entity.response.SuggestionLikeVO | ||
|
||
data class SuggestionLikeDTO( | ||
val isLiked: Boolean?, | ||
val likeNum: String? | ||
) { | ||
fun toVO() = SuggestionLikeVO( | ||
isLiked = requireNotNull(isLiked), | ||
likeNum = requireNotNull(likeNum) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
domain/src/main/java/com/lgtm/domain/entity/response/DeleteSuggestionVO.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.lgtm.domain.entity.response | ||
|
||
data class DeleteSuggestionVO( | ||
val suggestionId: Int, | ||
val success: Boolean | ||
) |
Oops, something went wrong.