Browse Source

Fix copy all times not respecting future slider value.

pull/113/head
Abhishek 2 years ago
parent
commit
bf99807553
  1. 7
      Clocker/Panel/ParentPanelController.swift

7
Clocker/Panel/ParentPanelController.swift

@ -1136,7 +1136,8 @@ extension ParentPanelController: NSSharingServicePickerDelegate {
} }
let timezoneOperations = TimezoneDataOperations(with: earliestTimezone, store: DataStore.shared()) let timezoneOperations = TimezoneDataOperations(with: earliestTimezone, store: DataStore.shared())
var sectionTitle = timezoneOperations.todaysDate(with: 0) // TODO: Take slider value into consideration let futureSliderValue = datasource?.sliderValue ?? 0
var sectionTitle = timezoneOperations.todaysDate(with: futureSliderValue)
clipboardCopy.append("\(sectionTitle)\n") clipboardCopy.append("\(sectionTitle)\n")
stride(from: 0, to: sortedByTime.count, by: 1).forEach { stride(from: 0, to: sortedByTime.count, by: 1).forEach {
@ -1144,8 +1145,8 @@ extension ParentPanelController: NSSharingServicePickerDelegate {
let dataModel = TimezoneData.customObject(from: sortedByTime[$0]) let dataModel = TimezoneData.customObject(from: sortedByTime[$0])
{ {
let dataOperations = TimezoneDataOperations(with: dataModel, store: DataStore.shared()) let dataOperations = TimezoneDataOperations(with: dataModel, store: DataStore.shared())
let date = dataOperations.todaysDate(with: 0) let date = dataOperations.todaysDate(with: futureSliderValue)
let time = dataOperations.time(with: 0) let time = dataOperations.time(with: futureSliderValue)
if date != sectionTitle { if date != sectionTitle {
sectionTitle = date sectionTitle = date
clipboardCopy.append("\n\(sectionTitle)\n") clipboardCopy.append("\n\(sectionTitle)\n")

Loading…
Cancel
Save