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

Send events only for selected day & refactor KalendarEvent #185

Merged
merged 4 commits into from
Mar 16, 2025

Conversation

hi-manshu
Copy link
Owner

  • Events are now sent only for the specific day that is clicked.
  • Refactored KalendarEvent into an interface for better flexibility:

Details:
#184

- Events are now sent only for the specific day that is clicked.
- Refactored `KalendarEvent` into an interface for better flexibility:
@hi-manshu hi-manshu self-assigned this Mar 16, 2025
@hi-manshu hi-manshu added the improvement made improvement on existing feature/module label Mar 16, 2025
- Events are now sent only for the specific day that is clicked.
- Refactored `KalendarEvent` into an interface for better flexibility:
@hi-manshu hi-manshu merged commit b6738d2 into main Mar 16, 2025
1 check passed
@hi-manshu hi-manshu deleted the fix/KalendarEventAndClick branch March 16, 2025 06:54
import kotlinx.datetime.LocalDate

fun LocalDate.onDayClick(
events: List<KalendarEvent>,
events: List<KalenderEvent>,

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?

Copy link
Owner Author

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 {

Choose a reason for hiding this comment

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

Can mark @Immutable

Copy link
Owner Author

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 = { _, _ -> },

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

Copy link
Owner Author

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

@hi-manshu
Copy link
Owner Author

#186

Added this @PatilShreyas thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement made improvement on existing feature/module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants