Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Fix bug when study hall's time end is midnight or later
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovelinux committed Sep 19, 2023
1 parent de0edf5 commit 909993a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog
All notable changes to this project will be documented in this file.
## [Unreleased]
- Fix bug that didn't show seats for some study halls

## [0.1.13]
- Fix bug that didn't allow to book a seat
Expand Down
2 changes: 1 addition & 1 deletion lib/features/booking/models/booking.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class BookingsPerSeats {

List<TimeRange> get slots => List.unmodifiable(
Iterable.generate(
(timeRange.timeEnd.hour - timeRange.timeStart.hour) * 2 +
(timeRange.normalizedTimeEnd.hour - timeRange.timeStart.hour) * 2 +
(timeRange.timeEnd.minute - timeRange.timeStart.minute + 1) ~/ 30,
(index) => TimeRange(
timeStart: timeRange.timeStart,
Expand Down

0 comments on commit 909993a

Please sign in to comment.