Remove marketplace tab

pull/673/head
Hwee-Boon Yar 6 years ago
parent 43d9028378
commit e0dcbe89c9
  1. 17
      AlphaWallet/InCoordinator.swift
  2. 11
      AlphaWalletTests/Coordinators/InCoordinatorTests.swift

@ -146,12 +146,9 @@ class InCoordinator: Coordinator {
let marketplaceController = MarketplaceViewController()
let marketplaceNavigationController = UINavigationController(rootViewController: marketplaceController)
//marketplaceController.tabBarItem = UITabBarItem(title: R.string.localizable.aMarketplaceTabbarItemTitle(), image: R.image.tab_marketplace()?.withRenderingMode(.alwaysOriginal), selectedImage: R.image.tab_marketplace())
marketplaceController.tabBarItem = UITabBarItem(title: R.string.localizable.aMarketplaceTabbarItemTitle(), image: R.image.tab_marketplace()?.withRenderingMode(.alwaysOriginal), selectedImage: R.image.tab_marketplace())
let tabBarController = TabBarController()
tabBarController.viewControllers = [
marketplaceNavigationController,
]
tabBarController.tabBar.isTranslucent = false
tabBarController.didShake = { [weak self] in
if inCoordinatorViewModel.canActivateDebugMode {
@ -170,9 +167,17 @@ class InCoordinator: Coordinator {
tokensCoordinator.delegate = self
tokensCoordinator.start()
addCoordinator(tokensCoordinator)
tabBarController.viewControllers?.append(tokensCoordinator.navigationController)
tabBarController.viewControllers = [
tokensCoordinator.navigationController
]
}
tabBarController.viewControllers?.append(transactionCoordinator.navigationController)
if let viewControllers = tabBarController.viewControllers, !viewControllers.isEmpty {
tabBarController.viewControllers?.append(transactionCoordinator.navigationController)
} else {
tabBarController.viewControllers = [transactionCoordinator.navigationController]
}
let browserCoordinator = BrowserCoordinator(session: session, keystore: keystore, sharedRealm: realm)
browserCoordinator.delegate = self

@ -23,12 +23,11 @@ class InCoordinatorTests: XCTestCase {
XCTAssertNotNil(tabbarController)
XCTAssert(tabbarController?.viewControllers!.count == 5)
XCTAssert((tabbarController?.viewControllers?[0] as? UINavigationController)?.viewControllers[0] is MarketplaceViewController)
XCTAssert((tabbarController?.viewControllers?[1] as? UINavigationController)?.viewControllers[0] is TokensViewController)
XCTAssert((tabbarController?.viewControllers?[2] as? UINavigationController)?.viewControllers[0] is TransactionsViewController)
XCTAssert((tabbarController?.viewControllers?[3] as? UINavigationController)?.viewControllers[0] is MasterBrowserViewController)
XCTAssert((tabbarController?.viewControllers?[4] as? UINavigationController)?.viewControllers[0] is SettingsViewController)
XCTAssert(tabbarController?.viewControllers!.count == 4)
XCTAssert((tabbarController?.viewControllers?[0] as? UINavigationController)?.viewControllers[0] is TokensViewController)
XCTAssert((tabbarController?.viewControllers?[1] as? UINavigationController)?.viewControllers[0] is TransactionsViewController)
XCTAssert((tabbarController?.viewControllers?[2] as? UINavigationController)?.viewControllers[0] is MasterBrowserViewController)
XCTAssert((tabbarController?.viewControllers?[3] as? UINavigationController)?.viewControllers[0] is SettingsViewController)
}
func testChangeRecentlyUsedAccount() {

Loading…
Cancel
Save