From 58f47cfe6fe315cc80a0fca87be91572799bf5eb Mon Sep 17 00:00:00 2001 From: Winnie Teichmann <4530+thatswinnie@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:12:00 +0100 Subject: [PATCH] Fix merge issues --- .../Tabs/TabDisplayViewController.swift | 42 +------------------ .../Browser/Tabs/TabTrayViewController.swift | 22 ---------- .../Home/HomepageViewController.swift | 18 -------- 3 files changed, 2 insertions(+), 80 deletions(-) diff --git a/Client/Frontend/Browser/Tabs/TabDisplayViewController.swift b/Client/Frontend/Browser/Tabs/TabDisplayViewController.swift index 3c5813c44a66..784796ea8c55 100644 --- a/Client/Frontend/Browser/Tabs/TabDisplayViewController.swift +++ b/Client/Frontend/Browser/Tabs/TabDisplayViewController.swift @@ -25,12 +25,7 @@ class TabDisplayViewController: UIViewController, private var backgroundPrivacyOverlay: UIView = .build() private lazy var emptyPrivateTabsView: EmptyPrivateTabsView = .build() -<<<<<<< HEAD:Client/Frontend/Browser/Tabs/TabDisplayViewController.swift - // MARK: Redux state var tabsState: TabsState -======= - var tabsState: TabsPanelState ->>>>>>> b7db64ae9 (Refactor FXIOS-7853 [v122] Redux pattern protocol improvements (#17542)):Client/Frontend/Browser/Tabs/Views/TabDisplayPanel.swift init(isPrivateMode: Bool, notificationCenter: NotificationProtocol = NotificationCenter.default, @@ -55,25 +50,7 @@ class TabDisplayViewController: UIViewController, setupView() listenForThemeChange(view) applyTheme() -<<<<<<< HEAD:Client/Frontend/Browser/Tabs/TabDisplayViewController.swift - subscribeRedux() - } - - private func subscribeRedux() { - store.dispatch(ActiveScreensStateAction.showScreen(.tabsPanel)) - store.dispatch(TabPanelAction.tabPanelDidLoad(tabsState.isPrivateMode)) - store.subscribe(self, transform: { - return $0.select(TabsState.init) - }) - } - - func newState(state: TabsState) { - tabsState = state - tabDisplayView.newState(state: tabsState) - shouldShowEmptyView(tabsState.isPrivateTabsEmpty) -======= subscribeToRedux() ->>>>>>> b7db64ae9 (Refactor FXIOS-7853 [v122] Redux pattern protocol improvements (#17542)):Client/Frontend/Browser/Tabs/Views/TabDisplayPanel.swift } func setupView() { @@ -129,7 +106,7 @@ class TabDisplayViewController: UIViewController, store.dispatch(ActiveScreensStateAction.showScreen(.tabsPanel)) store.dispatch(TabPanelAction.tabPanelDidLoad(tabsState.isPrivateMode)) store.subscribe(self, transform: { - return $0.select(TabsPanelState.init) + return $0.select(TabsState.init) }) } @@ -138,27 +115,12 @@ class TabDisplayViewController: UIViewController, store.unsubscribe(self) } - func newState(state: TabsPanelState) { + func newState(state: TabsState) { tabsState = state tabDisplayView.newState(state: tabsState) shouldShowEmptyView(tabsState.isPrivateTabsEmpty) } // MARK: EmptyPrivateTabsViewDelegate -<<<<<<< HEAD:Client/Frontend/Browser/Tabs/TabDisplayViewController.swift func didTapLearnMore(urlRequest: URLRequest) {} -======= - - func didTapLearnMore(urlRequest: URLRequest) { - store.dispatch(TabPanelAction.learnMorePrivateMode(urlRequest)) - } -} - -extension TabDisplayPanel: TabPeekDelegate { - func tabPeekDidAddToReadingList(_ tab: Tab) -> ReadingListItem? { return nil } - func tabPeekDidAddBookmark(_ tab: Tab) {} - func tabPeekRequestsPresentationOf(_ viewController: UIViewController) {} - func tabPeekDidCloseTab(_ tab: Tab) {} - func tabPeekDidCopyUrl() {} ->>>>>>> b7db64ae9 (Refactor FXIOS-7853 [v122] Redux pattern protocol improvements (#17542)):Client/Frontend/Browser/Tabs/Views/TabDisplayPanel.swift } diff --git a/Client/Frontend/Browser/Tabs/TabTrayViewController.swift b/Client/Frontend/Browser/Tabs/TabTrayViewController.swift index 717a6da5bd1c..6f1560935b52 100644 --- a/Client/Frontend/Browser/Tabs/TabTrayViewController.swift +++ b/Client/Frontend/Browser/Tabs/TabTrayViewController.swift @@ -229,24 +229,7 @@ class TabTrayViewController: UIViewController, super.viewDidDisappear(animated) delegate?.didFinish() -<<<<<<< HEAD:Client/Frontend/Browser/Tabs/TabTrayViewController.swift - store.dispatch(ActiveScreensStateAction.closeScreen(.tabsTray)) - store.unsubscribe(self) - } - - private func subscribeRedux() { - store.dispatch(ActiveScreensStateAction.showScreen(.tabsTray)) - store.dispatch(TabTrayAction.tabTrayDidLoad(tabTrayState.selectedPanel)) - store.subscribe(self, transform: { - return $0.select(TabTrayState.init) - }) - } - - func newState(state: TabTrayState) { - tabTrayState = state -======= unsubscribeFromRedux() ->>>>>>> b7db64ae9 (Refactor FXIOS-7853 [v122] Redux pattern protocol improvements (#17542)):Client/Frontend/Browser/Tabs/Views/TabTrayViewController.swift } private func updateLayout() { @@ -280,11 +263,6 @@ class TabTrayViewController: UIViewController, } func newState(state: TabTrayState) { - tabTrayState = state - - if tabTrayState.shouldDismiss { - dismissVC() - } } // MARK: Themeable diff --git a/Client/Frontend/Home/HomepageViewController.swift b/Client/Frontend/Home/HomepageViewController.swift index fd1aba6548d5..e1ffcf3a1510 100644 --- a/Client/Frontend/Home/HomepageViewController.swift +++ b/Client/Frontend/Home/HomepageViewController.swift @@ -113,10 +113,6 @@ class HomepageViewController: UIViewController, FeatureFlaggable, Themeable, Con jumpBackInContextualHintViewController.stopTimer() syncTabContextualHintViewController.stopTimer() notificationCenter.removeObserver(self) -<<<<<<< HEAD -======= - unsubscribeFromRedux() ->>>>>>> b7db64ae9 (Refactor FXIOS-7853 [v122] Redux pattern protocol improvements (#17542)) } // MARK: - View lifecycle @@ -259,20 +255,6 @@ class HomepageViewController: UIViewController, FeatureFlaggable, Themeable, Con return layout } - // MARK: - Redux - - func subscribeToRedux() { - store.subscribe(self) - } - - func unsubscribeFromRedux() { - store.unsubscribe(self) - } - - func newState(state: AppState) { - // TODO: https://mozilla-hub.atlassian.net/browse/FXIOS-7190 - } - // MARK: Long press private lazy var longPressRecognizer: UILongPressGestureRecognizer = {