Skip to content

Commit

Permalink
Fix off-by-one error in agenda display
Browse files Browse the repository at this point in the history
As noted by aranor.16 on Matrix chat, the watch is supposed to show
today's agenda items when you swipe left, but there was an off-by-one
error that only showed items for the next month on the same day.  This
has been fixed, and it now works perfectly with the calendar.

Signed-off-by: Ed Beroset <[email protected]>
  • Loading branch information
beroset authored and MagneFire committed Jun 3, 2023
1 parent fed5064 commit a6d6608
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qml/today/Today.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ListView {
}

property int year: todayClock.time.getFullYear()
property int month: todayClock.time.getMonth()+1
property int month: todayClock.time.getMonth()
property int day: todayClock.time.getDate()

ConfigurationValue {
Expand Down Expand Up @@ -152,8 +152,8 @@ ListView {

model: AgendaModel {
id: agendaModel
startDate: new Date(year, month, day)
endDate: startDate
startDate: new Date(year, month, day, 0, 0, 0)
endDate: new Date(year, month, day, 23, 59, 59)
}

delegate: Component {
Expand Down

0 comments on commit a6d6608

Please sign in to comment.