Skip to content

Patch 1.1.0#45

Merged
alina-p-k merged 4 commits intomainfrom
1.1.0
Sep 4, 2025
Merged

Patch 1.1.0#45
alina-p-k merged 4 commits intomainfrom
1.1.0

Conversation

@alina-p-k
Copy link
Contributor

@alina-p-k alina-p-k commented Sep 4, 2025

feat:

  • Updated CalendarView to ensure compatibility with iOS 26
  • Introduced new abbreviated weekday symbol format in WeekdaySymbolFormat (e.g. "Mon", "Thu")

- added semiShort date formatter
- fixed problem with threads
@alina-p-k alina-p-k requested a review from Copilot September 4, 2025 14:31
@alina-p-k alina-p-k requested a review from FulcrumOne September 4, 2025 14:38
@alina-p-k alina-p-k merged commit c2c0ecc into main Sep 4, 2025
0 of 2 checks passed
@alina-p-k alina-p-k deleted the 1.1.0 branch September 4, 2025 14:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This patch adds @MainActor annotations to view-related protocols and functions to ensure thread safety for UI operations in SwiftUI. It also introduces a new abbreviated weekday symbol format option.

  • Add @MainActor annotations to view protocols and functions for thread safety
  • Introduce new abbreviated case to WeekdaySymbolFormat enum
  • Implement formatting logic for the new abbreviated weekday format

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Public+WeekdaysView.swift Adds @MainActor to WeekdaysView protocol
Public+WeekdayLabel.swift Adds @MainActor to WeekdayLabel protocol
Public+MonthLabel.swift Adds @MainActor to MonthLabel protocol
Public+DayView.swift Adds @MainActor to DayView protocol and body/function implementations
Public+View.swift Adds @MainActor to erased() function
Public+WeekdaySymbolFormat.swift Adds new abbreviated case to enum
MDateFormatter.swift Implements formatting logic for abbreviated weekday symbols

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

static func getString(for weekday: MWeekday, format: WeekdaySymbolFormat) -> String {
switch format {
case .veryShort: return getFormatter().veryShortWeekdaySymbols[weekday.rawValue - 1].capitalized
case .abbreviated: return getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].prefix(2).capitalized
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

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

The .capitalized method on String.SubSequence may not produce the expected result. Since prefix(2) returns a SubSequence, calling .capitalized might not properly capitalize only the first letter. Consider converting to String first: String(getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].prefix(2)).capitalized

Suggested change
case .abbreviated: return getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].prefix(2).capitalized
case .abbreviated: return String(getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].prefix(2)).capitalized

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants