From ca117642b06dd0a8bb014d191f1c8520875906e8 Mon Sep 17 00:00:00 2001 From: Steven Deutsch Date: Wed, 13 Jun 2018 18:06:25 -0500 Subject: [PATCH 1/2] Relax protocol requirements for get/set --- Sources/Protocols/LocationItem.swift | 4 ++-- Sources/Protocols/MediaItem.swift | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/Protocols/LocationItem.swift b/Sources/Protocols/LocationItem.swift index 5cb12b5d..f08fccb3 100644 --- a/Sources/Protocols/LocationItem.swift +++ b/Sources/Protocols/LocationItem.swift @@ -28,9 +28,9 @@ import class CoreLocation.CLLocation public protocol LocationItem { /// The location. - var location: CLLocation { get set } + var location: CLLocation { get } /// The size of the location item. - var size: CGSize { get set } + var size: CGSize { get } } diff --git a/Sources/Protocols/MediaItem.swift b/Sources/Protocols/MediaItem.swift index 10acfe12..cddb94c7 100644 --- a/Sources/Protocols/MediaItem.swift +++ b/Sources/Protocols/MediaItem.swift @@ -28,15 +28,15 @@ import Foundation public protocol MediaItem { /// The url where the media is located. - var url: URL? { get set } + var url: URL? { get } /// The image. - var image: UIImage? { get set } + var image: UIImage? { get } /// A placeholder image for when the image is obtained asychronously. - var placeholderImage: UIImage { get set } + var placeholderImage: UIImage { get } /// The size of the media item. - var size: CGSize { get set } + var size: CGSize { get } } From f78d71177dab9275bb185e033b2721b3d9861a3e Mon Sep 17 00:00:00 2001 From: Steven Deutsch Date: Wed, 13 Jun 2018 18:11:38 -0500 Subject: [PATCH 2/2] Add CHANGELOG entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30eecdb9..03e56f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa ## Upcoming release +### Changed + +- Relaxed the settable requirement for the `LocationItem` and `MediaItem` protocols. +[#727](https://github.com/MessageKit/MessageKit/pull/716) by [@SD10](https://github.com/sd10). + ### Fixed - Fixed `MessageContentCell`'s subviews `frame` when size equal to `.zero`.