diff --git a/CHANGES.rst b/CHANGES.rst index bcb1f0407..6c30afa3c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,30 @@ +Changes in 0.14.2 (2021-02-24) +================================================= + +✨ Features + * + +🙌 Improvements + * MXKRoomDataSource: Notify subclasses on room change. + +🐛 Bugfix + * + +⚠️ API Changes + * + +🗣 Translations + * + +🧱 Build + * + +Others + * + +Improvements: + * Upgrade MatrixSDK version ([v0.18.2](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.18.2)). + Changes in 0.14.1 (2021-02-12) ================================================= diff --git a/MatrixKit.podspec b/MatrixKit.podspec index 9ae0b244a..0a453b57c 100644 --- a/MatrixKit.podspec +++ b/MatrixKit.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MatrixKit" - s.version = "0.14.1" + s.version = "0.14.2" s.summary = "The Matrix reusable UI library for iOS based on MatrixSDK." s.description = <<-DESC @@ -23,7 +23,7 @@ Pod::Spec.new do |s| s.swift_version = '5.0' - s.dependency 'MatrixSDK', "= 0.18.1" + s.dependency 'MatrixSDK', "= 0.18.2" s.dependency 'HPGrowingTextView', '~> 1.1' s.dependency 'libPhoneNumber-iOS', '~> 0.9.13' s.dependency 'DTCoreText', '~> 1.6.23' diff --git a/MatrixKit/MatrixKitVersion.m b/MatrixKit/MatrixKitVersion.m index 115a6ee6e..b2f4179d1 100644 --- a/MatrixKit/MatrixKitVersion.m +++ b/MatrixKit/MatrixKitVersion.m @@ -16,4 +16,4 @@ #import -NSString *const MatrixKitVersion = @"0.14.1"; +NSString *const MatrixKitVersion = @"0.14.2"; diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.h b/MatrixKit/Models/Room/MXKRoomDataSource.h index 53e85d139..a89ea41d7 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.h +++ b/MatrixKit/Models/Room/MXKRoomDataSource.h @@ -329,6 +329,11 @@ extern NSString *const kMXKRoomDataSourceTimelineErrorErrorKey; */ - (void)reload; +/** + Called when room property changed. Designed to be used by subclasses. + */ +- (void)roomDidSet; + #pragma mark - Public methods /** Get the data for the cell at the given index. diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index b5acda867..d531e8518 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -171,6 +171,8 @@ Current pagination request (if any) */ @property (nonatomic, assign) BOOL shouldStopBackPagination; +@property (nonatomic, readwrite) MXRoom *room; + @end @implementation MXKRoomDataSource @@ -482,7 +484,7 @@ - (void)reset [eventIdToBubbleMap removeAllObjects]; } - _room = nil; + self.room = nil; } _serverSyncEventCount = 0; @@ -567,11 +569,11 @@ - (void)didMXSessionStateChange // Are we peeking into a random room or displaying a room the user is part of? if (peekingRoom) { - _room = peekingRoom; + self.room = peekingRoom; } else { - _room = [self.mxSession roomWithRoomId:_roomId]; + self.room = [self.mxSession roomWithRoomId:_roomId]; } if (_room) @@ -1058,6 +1060,21 @@ - (void)setDelegate:(id)delegate } } +- (void)setRoom:(MXRoom *)room +{ + if (![_room isEqual:room]) + { + _room = room; + + [self roomDidSet]; + } +} + +- (void)roomDidSet +{ + +} + #pragma mark - KVO - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context diff --git a/Podfile b/Podfile index 92bbc2605..18e4df9cc 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,7 @@ abstract_target 'MatrixKitSamplePods' do # Different flavours of pods to Matrix SDK # The tagged version on which this version of MatrixKit has been built - pod 'MatrixSDK', '= 0.18.1' + pod 'MatrixSDK', '= 0.18.2' # The lastest release available on the CocoaPods repository #pod 'MatrixSDK' diff --git a/Podfile.lock b/Podfile.lock index 82bb4c197..4d9c50a0c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -39,19 +39,19 @@ PODS: - JSQSystemSoundPlayer (2.0.1) - libbase58 (0.1.4) - libPhoneNumber-iOS (0.9.15) - - MatrixSDK (0.18.1): - - MatrixSDK/Core (= 0.18.1) - - MatrixSDK/Core (0.18.1): + - MatrixSDK (0.18.2): + - MatrixSDK/Core (= 0.18.2) + - MatrixSDK/Core (0.18.2): - AFNetworking (~> 4.0.0) - GZIP (~> 1.3.0) - libbase58 (~> 0.1.4) - - OLMKit (~> 3.1.0) + - OLMKit (~> 3.2.2) - Realm (= 10.1.4) - - OLMKit (3.1.0): - - OLMKit/olmc (= 3.1.0) - - OLMKit/olmcpp (= 3.1.0) - - OLMKit/olmc (3.1.0) - - OLMKit/olmcpp (3.1.0) + - OLMKit (3.2.2): + - OLMKit/olmc (= 3.2.2) + - OLMKit/olmcpp (= 3.2.2) + - OLMKit/olmc (3.2.2) + - OLMKit/olmcpp (3.2.2) - Realm (10.1.4): - Realm/Headers (= 10.1.4) - Realm/Headers (10.1.4) @@ -62,7 +62,7 @@ DEPENDENCIES: - HPGrowingTextView (~> 1.1) - JSQMessagesViewController (~> 7.2.0) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.18.1) + - MatrixSDK (= 0.18.2) SPEC REPOS: trunk: @@ -91,10 +91,10 @@ SPEC CHECKSUMS: JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75 - MatrixSDK: 7d5faf810eab02a189df64aef28583c8bed81f5c - OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639 + MatrixSDK: b37cb20c40c77d1f64af2427f3c547611f8b5ec8 + OLMKit: 20d1c564033a1ae7148f8f599378d4c798363905 Realm: 80f4fb2971ccb9adc27a47d0955ae8e533a7030b -PODFILE CHECKSUM: c39efdcb46b89ce6146a2ec892ad46f99c1aabb3 +PODFILE CHECKSUM: 2055cf652368ec959b2c25efc2291086f5d35e01 COCOAPODS: 1.10.0