|
|
|
@ -71,9 +71,15 @@ class UpcomingEventStatusItemView: NSView {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private func initialSetup() { |
|
|
|
|
nextEventField.attributedStringValue = NSAttributedString(string: "Next Event", attributes: textFontAttributes) |
|
|
|
|
nextEventField.attributedStringValue = NSAttributedString(string: dataObject.event.title, attributes: textFontAttributes) |
|
|
|
|
etaField.attributedStringValue = NSAttributedString(string: dataObject.metadataForMeeting(), attributes: timeAttributes) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@available(OSX 10.14, *) |
|
|
|
|
override func viewDidChangeEffectiveAppearance() { |
|
|
|
|
super.viewDidChangeEffectiveAppearance() |
|
|
|
|
statusItemViewSetNeedsDisplay() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func updateWithNextEventInfo(_ metadata: String) { |
|
|
|
|
nextEventField.attributedStringValue = NSAttributedString(string: "Next Event", attributes: textFontAttributes) |
|
|
|
@ -89,3 +95,16 @@ class UpcomingEventStatusItemView: NSView {
|
|
|
|
|
mainDelegate.togglePanel(event) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
extension UpcomingEventStatusItemView: StatusItemViewConforming { |
|
|
|
|
|
|
|
|
|
func statusItemViewSetNeedsDisplay() { |
|
|
|
|
nextEventField.attributedStringValue = NSAttributedString(string: dataObject.event.title, attributes: textFontAttributes) |
|
|
|
|
etaField.attributedStringValue = NSAttributedString(string: dataObject.metadataForMeeting(), attributes: timeAttributes) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func statusItemViewIdentifier() -> String { |
|
|
|
|
return "upcoming_event_view" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|