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

Remove Time.copyWithAddedMinutes and add Time.isNextDayWith #306

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

nilsreichardt
Copy link
Member

@nilsreichardt nilsreichardt commented Sep 29, 2022

Just a quick refactoring of remove Time.copyWithAddedMinutes and adding Time.isNextDayWith. Time.copyWithAddedMinutes has been used in the timetable settings to configure the period times.

Manually testing:

RPReplay_Final1664443554.MP4

Closes #303

@@ -169,12 +169,17 @@ class Periods {
number: 1, startTime: Time(hour: 7), endTime: Time(hour: 8));
} else {
final lastPeriod = getPeriods()?.last;
final durationOfLastPeriod =
final minutesOfLastPeriod =
Copy link
Member Author

Choose a reason for hiding this comment

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

Just renaming the variable because durationOfLastPeriod suggests that the type is Duration.

@github-actions
Copy link

github-actions bot commented Sep 29, 2022

Visit the preview URL for this PR (updated for commit 10a46cd):

https://sharezone-test--pr306-remove-copy-with-add-p13e7ev7.web.app

(expires Thu, 06 Oct 2022 07:38:48 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@nilsreichardt
Copy link
Member Author

⬇️ Generated builds by Codemagic for commit 10a46cd ⬇️

Note: Only Sharezone team members are able to install the iOS app.

iOS Android
image
Download link
image
Download link

@nilsreichardt nilsreichardt added the refactoring Restructuring and cleaning up existing code without changing its existing behaviour. label Sep 29, 2022
@nilsreichardt nilsreichardt merged commit 882b76c into main Sep 29, 2022
@nilsreichardt nilsreichardt deleted the remove-copy-with-added-minutes branch September 29, 2022 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Restructuring and cleaning up existing code without changing its existing behaviour. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time(hour: 23).copyWithAddedMinutes(120) is Time(hour: 25) but should be Time(hour: 1)
2 participants