Skip to content

Commit

Permalink
Make model type erasers conform to StyleIDProviding (#29)
Browse files Browse the repository at this point in the history
As titled. This allows us to write more generic code on these type-erased models.
  • Loading branch information
erichoracek authored Apr 22, 2021
1 parent d4c6578 commit fdad79f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added support for `Array` and `Optional` expressions to model result builders
- Added support for `Optional` expressions to `PresentationModel` result builders
- Made `AnyItemModel` conform to `DidChangeStateProviding`, `DidChangeStateProviding` and `SetBehaviorsProviding`
- Made `AnySupplementaryItemModel` conform to `DidChangeStateProviding`, and `SetBehaviorsProviding`
- Made `AnyItemModel` and `AnySupplementaryItemModel` conform to `DidChangeStateProviding`,
`DidChangeStateProviding` and `SetBehaviorsProviding`
- Made `AnyItemModel`, `AnySupplementaryItemModel`, and `AnyBarModel` conform to `StyleIDProviding`
- Adds a `keyboardContentInsetAdjustment` property to `UIScrollView` with the amount that the that its `contentInset.bottom` has been adjusted to accommodate for the keyboard by a `KeyboardPositionWatcher`
- Made `ItemSelectionStyle` conform to `Hashable`
- `ReuseIDStore` has a new method to vend a previously registered reuse ID, `registeredReuseID(for:)`
Expand Down
4 changes: 4 additions & 0 deletions Sources/EpoxyBars/BarModel/AnyBarModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ extension AnyBarModel: BarModeling {

extension AnyBarModel: DataIDProviding {}

// MARK: StyleIDProviding

extension AnyBarModel: StyleIDProviding {}

// MARK: Diffable

extension AnyBarModel: Diffable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ extension AnyItemModel: DidChangeStateProviding {}

extension AnyItemModel: SetBehaviorsProviding {}

// MARK: StyleIDProviding

extension AnyItemModel: StyleIDProviding {}

// MARK: ItemModeling

extension AnyItemModel: ItemModeling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ extension AnySupplementaryItemModel: SetContentProviding {}

extension AnySupplementaryItemModel: SetBehaviorsProviding {}

// MARK: StyleIDProviding

extension AnySupplementaryItemModel: StyleIDProviding {}

// MARK: SupplementaryItemModeling

extension AnySupplementaryItemModel: SupplementaryItemModeling {
Expand Down

0 comments on commit fdad79f

Please sign in to comment.