-
Notifications
You must be signed in to change notification settings - Fork 1
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
[feature/register-photo-ui] 사진 등록 UI 구성 #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
4b8fad0
to
cefa77c
Compare
5fbf289
to
90d3a55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!!!
class HomeViewModel : ViewModel() { | ||
var currentAlbum: AlbumItem? = null | ||
private set | ||
|
||
fun onUpdateAlbum(album: AlbumItem?) { | ||
currentAlbum = album | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentAlbum을 observalbe한 변수가 아닌 nullable한 변수로 지정한 이유가 있을까요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘를 변경감지해서 사용할 수 있는 부분이 딱히 없어서 collect 하는 걸 제외했습니다.
binding.bottomNavFav.setOnClickListener { | ||
imagePicker.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jpg, png만 따로 처리하는 부분이 ImageOnly 상수인가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵넵
val currentCreatedAt = viewModel.createdAt.value | ||
val picker = MaterialDatePicker.Builder | ||
.datePicker() | ||
.setTheme(R.style.ThemeOverlay_Pophory_MaterialCalendar) | ||
.setInputMode(MaterialDatePicker.INPUT_MODE_CALENDAR) | ||
.setCalendarConstraints( | ||
CalendarConstraints.Builder() | ||
.setValidator( | ||
DateValidatorPointBackward.now() | ||
) | ||
.setEnd(Instant.systemNow().toEpochMilliseconds()).build() | ||
) | ||
.setSelection( | ||
currentCreatedAt + TimeZone.getDefault().getOffset(currentCreatedAt) | ||
) | ||
.build() | ||
picker.show(supportFragmentManager, "datePicker") | ||
picker.addOnPositiveButtonClickListener(viewModel::onUpdateCreateAt) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
이슈 코드