-
Notifications
You must be signed in to change notification settings - Fork 70
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
Send events only for selected day & refactor KalendarEvent #185
Conversation
- Events are now sent only for the specific day that is clicked. - Refactored `KalendarEvent` into an interface for better flexibility:
- Events are now sent only for the specific day that is clicked. - Refactored `KalendarEvent` into an interface for better flexibility:
…shu/Kalendar into fix/KalendarEventAndClick
import kotlinx.datetime.LocalDate | ||
|
||
fun LocalDate.onDayClick( | ||
events: List<KalendarEvent>, | ||
events: List<KalenderEvent>, |
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.
from performance perspective, can you migrate all list usages to ImmutableList?
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.
I can, but that all plan is for later implementation!
/** | ||
* Represents an event in the calendar. | ||
*/ | ||
interface KalenderEvent { |
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.
Can mark @Immutable
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.
Yeah! Plan for later
@@ -58,7 +58,7 @@ fun KalendarDay( | |||
selectedDate: LocalDate = date, | |||
events: KalendarEvents = KalendarEvents(), | |||
dayKonfig: KalendarDayKonfig = KalendarDayKonfig.default(), | |||
onDayClick: (LocalDate, List<KalendarEvent>) -> Unit = { _, _ -> }, | |||
onDayClick: (LocalDate, List<KalenderEvent>) -> Unit = { _, _ -> }, |
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.
I think you should extend compose compiler parameters and declare LocalDate
as a stable type. This can help in perf
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.
Yea, can be done. Later in plan
Added this @PatilShreyas thanks! |
KalendarEvent
into an interface for better flexibility:Details:
#184