 
         stateTransitionBehaviors = [
             TableViewUpdateBehavior(viewModel: self),
+            RefreshControlBehavior(viewModel: self),
             RestorePositionBehavior(viewModel: self),
             RefreshTimeCachingBehavior(viewModel: self),
             HudBehavior(viewModel: self),

        }.skipRepeats()

        model.producer.startWithValues { [weak self] (model) in
            guard let strongSelf = self else { return }

            switch (model.target, model.state) {
            case (_, .loaded):
                strongSelf.refreshControlEndRefreshingObserver.send(value: ())

            case (.blank, .error):
                strongSelf.refreshControlEndRefreshingObserver.send(value: ())

            case (.forum, .fetchingMore):
                break

            }
        }
    }


    /// Calling ODRefreshControl.endRefreshing() may cause UITableVIew request cellForRowAtIndexPath.
    /// This behavior must be performed after TableViewUpdateBehavior.
    /// See: Crashlytics #648
    final class RefreshControlBehavior: StateTransitionBehavior<TopicListViewModel, Model, Action> {
        override func postTransition(action: Action, from: Model, to: Model) {
            guard let viewModel = self.viewModel else { return }

            switch (to.target, to.state) {
            case (_, .loaded):
                viewModel.refreshControlEndRefreshingObserver.send(value: ())
            case (.blank, .error):
                viewModel.refreshControlEndRefreshingObserver.send(value: ())
            default:
                break
            }
        }
    }
}

// MARK: - Private
