Skip to content

Commit

Permalink
Rename calendarEventsCoordinates property to calendarEventCoordinateL…
Browse files Browse the repository at this point in the history
…ist in CalendarListEvent to improve naming
  • Loading branch information
tyiu committed Dec 22, 2023
1 parent 70a72b9 commit 0abbbf3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/NostrSDK/Events/Calendars/CalendarListEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public final class CalendarListEvent: NostrEvent, IdentifierTagInterpreting, Tit
}

/// The event coordinates of the calendar events that belong to this calendar.
public var calendarEventsCoordinates: [EventCoordinates] {
public var calendarEventCoordinateList: [EventCoordinates] {
tags.compactMap { EventCoordinates(eventCoordinatesTag: $0) }
.filter { $0.kind == .dateBasedCalendarEvent || $0.kind == .timeBasedCalendarEvent }
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/NostrSDKTests/EventCreatingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ final class EventCreatingTests: XCTestCase, EventCreating, EventVerifying, Fixtu
XCTAssertEqual(calendar.identifier, identifier)
XCTAssertEqual(calendar.title, title)
XCTAssertEqual(calendar.content, description)
XCTAssertEqual(calendar.calendarEventsCoordinates, [dateBasedCalendarEventCoordinates, timeBasedCalendarEventCoordinates])
XCTAssertEqual(calendar.calendarEvents, [dateBasedCalendarEventCoordinates, timeBasedCalendarEventCoordinates])

try verifyEvent(calendar)
}
Expand All @@ -589,7 +589,7 @@ final class EventCreatingTests: XCTestCase, EventCreating, EventVerifying, Fixtu
XCTAssertEqual(calendar.identifier, identifier)
XCTAssertEqual(calendar.title, title)
XCTAssertEqual(calendar.content, description)
XCTAssertEqual(calendar.calendarEventsCoordinates, [])
XCTAssertEqual(calendar.calendarEvents, [])

try verifyEvent(calendar)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/NostrSDKTests/EventDecodingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ final class EventDecodingTests: XCTestCase, FixtureLoading {

let pubkey = try XCTUnwrap(PublicKey(hex: "9947f9659dd80c3682402b612f5447e28249997fb3709500c32a585eb0977340"))
XCTAssertEqual(
event.calendarEventsCoordinates,
event.calendarEvents,
[
EventCoordinates(kind: .dateBasedCalendarEvent, pubkey: pubkey, identifier: "D5EB0A5A-0B36-44DB-95C3-DB51799894E6"),
EventCoordinates(kind: .timeBasedCalendarEvent, pubkey: pubkey, identifier: "1D355ED3-A45D-41A9-B3A5-709211794EFB")
Expand Down

0 comments on commit 0abbbf3

Please sign in to comment.