Skip to content

Commit

Permalink
Fix force placeholder reload
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymonMrozek committed Jun 11, 2018
1 parent ad08e49 commit 83364f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Stefan/Stefan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ public class Stefan<ItemType: Equatable>: NSObject, ItemsLoadableStateDiffer {
}
}

public func reloadPlaceholder() {
placeholderPresenter?.reloadPlaceholder(forState: _state)
public func reloadPlaceholder(force: Bool = false) {
if force || shouldDisplayPlaceholder(_state) {
placeholderPresenter?.reloadPlaceholder(forState: _state)
}
}

private func reloadItems(old: [ItemType], new: [ItemType]) {
Expand Down

0 comments on commit 83364f3

Please sign in to comment.