Skip to content

Commit

Permalink
add refresh (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoeriVD authored Jul 23, 2024
1 parent 3eed6c6 commit a876db1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Next calls/CarPlay/CarplayList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ struct CarplayList {

var template: CPListTemplate = CPListTemplate(title: "Next calls", sections: [])
func update(){
template.updateSections([self.getSection(), CPListSection(items: [refresh])])
_ = viewModel.fetchReminders {
template.updateSections([self.getSection(), CPListSection(items: [refresh])])
}
}

var refresh : CPListItem {
var item = CPListItem(text: nil, detailText: nil, image: UIImage(systemName: "arrow.clockwise.circle"))
let item = CPListItem(text: nil, detailText: nil, image: UIImage(systemName: "arrow.clockwise.circle"))

item.handler = { item, completion in
_ = viewModel.fetchReminders {
Expand Down

0 comments on commit a876db1

Please sign in to comment.