Skip to content

Commit

Permalink
Return early if place in menubar is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Mar 31, 2024
1 parent fc92609 commit 5e03282
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Clocker/Panel/Data Layer/TimezoneDataOperations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ extension TimezoneDataOperations {
func compactMenuTitle() -> String {
var subtitle = CLEmptyString

let shouldDayBeShown = store.shouldShowDayInMenubar()
let shouldLabelBeShownAlongWithTime = !store.shouldDisplay(.placeInMenubar)


if shouldLabelBeShownAlongWithTime == false {
return dataObject.formattedTimezoneLabel()
}

let shouldDayBeShown = store.shouldShowDayInMenubar()
if shouldDayBeShown, shouldLabelBeShownAlongWithTime {
let substring = date(with: 0, displayType: .menu)
subtitle.append(substring)
Expand Down

1 comment on commit 5e03282

@n0shake
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of checking day, date preference, return early with the timezone label:

Screenshot 2024-03-31 at 4 56 32 PM

Please sign in to comment.