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

Enhancement: 시스템 앱 알림 화면 전환 외 #229

Merged
merged 8 commits into from
Dec 13, 2023

Conversation

LeeHaiLim
Copy link
Collaborator

개요

  • �개선입니다

설명

  • 알림 설정 클릭 시 시스템 설정으로 화면이 전환되도록 했습니다.
  • flow의 catch에서 처리된 예외를 다시 flow로 emit하도록 했습니다.

@LeeHaiLim LeeHaiLim self-assigned this Dec 11, 2023
@LeeHaiLim LeeHaiLim added Android 안드로이드 Enhancement labels Dec 11, 2023
Copy link
Collaborator

@p-chanmin p-chanmin left a comment

Choose a reason for hiding this comment

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

LGTM~!

Comment on lines +57 to +65
private fun navigateToNotificationSetting() {
val intent = Intent().apply {
action = Settings.ACTION_APP_NOTIFICATION_SETTINGS
putExtra(Settings.EXTRA_APP_PACKAGE, requireContext().packageName)
}
try {
startActivity(intent)
} catch (e: Exception) {
showMessage(R.string.setting_notification_navigate_fail, e.message.orEmpty())
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍👍

Comment on lines +27 to +39
fun getSyncedEvents(startDateTime: Long, endDateTime: Long): Flow<List<Event>> {
return remoteCalendarDataSource
.getEvents(
startDateTime.toDateString(DateTimeFormat.ISO_DATE_TIME, ZoneId.of("UTC")),
endDateTime.toDateString(DateTimeFormat.ISO_DATE_TIME, ZoneId.of("UTC"))
).onEach {
localCalendarDataSource.deleteEvents(startDateTime, endDateTime)
localCalendarDataSource.insertEvents(it.map(EventResponse::toEvent))
}.map {
localCalendarDataSource.getEvents(startDateTime, endDateTime).first()
}.catch {
emit(localCalendarDataSource.getEvents(startDateTime, endDateTime).first())
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

catch에서 emit하는 방법 좋습니다! 👍👍

}.map {
localCalendarDataSource.getEvents(startDateTime, endDateTime).first()
}.catch {
emit(localCalendarDataSource.getEvents(startDateTime, endDateTime).first())
Copy link
Collaborator

Choose a reason for hiding this comment

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

좋은 방법이네요!!

Comment on lines +27 to +34
fun from(parent: ViewGroup, listener: CalendarItemClickListener): MonthCalendarViewHolder {
val inflater = LayoutInflater.from(parent.context)
return MonthCalendarViewHolder(
ItemCalendarBinding.inflate(inflater, parent, false)
.apply { root.layoutParams.height = parent.measuredHeight / 6 },
listener
)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

일관된 코드 좋습니다!!

Copy link
Collaborator

@agfalcon agfalcon left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

@agfalcon agfalcon merged commit 5a3ee0a into boostcampwm2023:dev Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android 안드로이드 Enhancement
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants