 
 import UIKit
+
+fileprivate enum TalkPageContainerViewState {
+    case initial
+    case fetchLoading
+    case fetchInitialResultData
+    case fetchInitialResultEmpty
+    case fetchFinishedResultData
+    case fetchFinishedResultEmpty
+    case fetchFailure(error: Error)
+    case linkLoading(loadingViewController: FakeLoading & ViewController)
+    case linkFinished(loadingViewController: FakeLoading & ViewController)
+    case linkFailure(loadingViewController: FakeLoading & ViewController, error: Error)
+    
+    var repliesAreDisabled: Bool {
+        switch self {
+        case .initial, .fetchLoading, .fetchInitialResultData, .fetchInitialResultEmpty, .fetchFailure, .linkLoading:
+            return true
+        case .fetchFinishedResultData, .fetchFinishedResultEmpty, .linkFinished, .linkFailure:
+            return false
+        }
+    }
+}
+
+extension TalkPageContainerViewState: Equatable {
+    
+    public static func ==(lhs: TalkPageContainerViewState, rhs:TalkPageContainerViewState) -> Bool {
+        switch lhs {
+        case .initial:
+            switch rhs {
+            case .initial:
+                return true
+            default:
+                return false
+            }
+        case .fetchLoading:
+            switch rhs {
+            case .fetchLoading:
+                return true
+            default:
+                return false
+            }
+        case .fetchInitialResultData:
+            switch rhs {
+            case .fetchInitialResultData:
+                return true
+            default:
+                return false
+            }
+        case .fetchInitialResultEmpty:
+            switch rhs {
+            case .fetchInitialResultEmpty:
+                return true
+            default:
+                return false
+            }
+        case .fetchFinishedResultData:
+            switch rhs {
+            case .fetchFinishedResultData:
+                return true
+            default:
+                return false
+            }
+        case .fetchFinishedResultEmpty:
+            switch rhs {
+            case .fetchFinishedResultEmpty:
+                return true
+            default:
+                return false
+            }
+        case .fetchFailure:
+            switch rhs {
+            case .fetchFailure:
+                return true
+            default:
+                return false
+            }
+        case .linkLoading:
+            switch rhs {
+            case .linkLoading:
+                return true
+            default:
+                return false
+            }
+        case .linkFinished:
+            switch rhs {
+            case .linkFinished:
+                return true
+            default:
+                return false
+            }
+        case .linkFailure:
+            switch rhs {
+            case .linkFailure:
+                return true
+            default:
+                return false
+            }
+        }
+    }
+}
 
 @objc(WMFTalkPageContainerViewController)
 class TalkPageContainerViewController: ViewController, HintPresenting {

        return progressController
    }()
    
    private var repliesAreDisabled = true {
        didSet {
            replyListViewController?.repliesAreDisabled = repliesAreDisabled
        }
    }
    

                return
            }
            
            if let error = error {
                self.viewState = .linkFailure(loadingViewController: loadingViewController, error: error)
                return
            }
            
            self.viewState = .linkFinished(loadingViewController: loadingViewController)
            
            if let namespace = articles.first?.pageNamespace,
                
