Skip to content

Commit

Permalink
Fixenot setting the studentGroup property for fetched next and prev…
Browse files Browse the repository at this point in the history
…ious weeks
  • Loading branch information
broadwaylamb committed Apr 17, 2017
1 parent 5f2b8c1 commit b101507
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [3.1.1](https://github.com/WeirdMath/TimetableSDK/tree/3.1.0) (2017-04-17)

- Fixed not setting the `studentGroup` property for fetched next and previous weeks

## [3.1.0](https://github.com/WeirdMath/TimetableSDK/tree/3.1.0) (2017-04-08)

- Now when calling a fetching method, you can disable force reloading. I. e. if somthing has already been fetched and saved to a property of a class that provides the fetching method, calling that method with `forceReload: false` returns the contents of that property.
Expand Down
2 changes: 2 additions & 0 deletions Sources/Week.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public final class Week : JSONRepresentable, TimetableEntity {
if case .success(let value) = result {
self?.next = value
value.previous = self
value.studentGroup = self?.studentGroup
}

completion(result)
Expand Down Expand Up @@ -231,6 +232,7 @@ public final class Week : JSONRepresentable, TimetableEntity {
if case .success(let value) = result {
self?.previous = value
value.next = self
value.studentGroup = self?.studentGroup
}

completion(result)
Expand Down
2 changes: 2 additions & 0 deletions Tests/TimetableSDKTests/WWWFetchingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ class WWWFetchingTests: XCTestCase {
XCTAssertEqual(next?.previous, current)
XCTAssertEqual(previous?.next, current)
XCTAssertEqual(previous, current?.previous)
XCTAssertEqual(next?.studentGroup, current?.studentGroup)
XCTAssertEqual(previous?.studentGroup, current?.studentGroup)
}
}

Expand Down
2 changes: 1 addition & 1 deletion TimetableSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "TimetableSDK"
s.version = "3.1.0"
s.version = "3.1.1"
s.summary = "Simple SDK for timetable.spbu.ru that works on macOS, iOS and watchOS"

s.description = <<-DESC
Expand Down

0 comments on commit b101507

Please sign in to comment.