-
Notifications
You must be signed in to change notification settings - Fork 0
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
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~!
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()) |
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.
👍👍
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()) | ||
} |
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.
catch에서 emit하는 방법 좋습니다! 👍👍
}.map { | ||
localCalendarDataSource.getEvents(startDateTime, endDateTime).first() | ||
}.catch { | ||
emit(localCalendarDataSource.getEvents(startDateTime, endDateTime).first()) |
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.
좋은 방법이네요!!
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 | ||
) | ||
} |
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.
일관된 코드 좋습니다!!
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.
고생하셨습니다!!
개요
설명