     fileprivate var loadingText = localizedString(key: "Loading")
     fileprivate var isAutomaticallyRefresh = true
     fileprivate var triggerAutomaticallyRefreshPercent: CGFloat = 0.1
+    fileprivate var lastUpdated: Date = Date()
 
     var state: RefreshState? {
         didSet {

    }

    fileprivate func beginRefreshing() {
        UIView.animate(withDuration: kCustomRefreshFastAnimationTime, animations: {
            self.alpha = 1.0
        })

    }

    open func endRefreshing() {
        if Date().timeIntervalSince(lastUpdated) < 0.1 {
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.5) {
                self.state = .idle
            }
        }
    }
}
