diff --git a/HabitRPG/Storyboards/Base.lproj/BuyModal.storyboard b/HabitRPG/Storyboards/Base.lproj/BuyModal.storyboard index 50c7a478f..42538885e 100644 --- a/HabitRPG/Storyboards/Base.lproj/BuyModal.storyboard +++ b/HabitRPG/Storyboards/Base.lproj/BuyModal.storyboard @@ -3,7 +3,7 @@ - + @@ -212,6 +212,7 @@ + diff --git a/HabitRPG/TableViewDataSources/ItemsViewDataSource.swift b/HabitRPG/TableViewDataSources/ItemsViewDataSource.swift index 4d04c7338..5c0d45a9f 100644 --- a/HabitRPG/TableViewDataSources/ItemsViewDataSource.swift +++ b/HabitRPG/TableViewDataSources/ItemsViewDataSource.swift @@ -15,9 +15,9 @@ class ItemsViewDataSource: BaseReactiveTableViewDataSource { var itemType: String? { didSet { if itemType != nil { - sections.forEach { section in - section.isHidden = section.key != itemType - } + sections.forEach { section in + section.isHidden = section.key != itemType + } } else { sections.forEach { section in section.isHidden = false @@ -154,11 +154,11 @@ class ItemsViewDataSource: BaseReactiveTableViewDataSource { } override func numberOfSections(in tableView: UITableView) -> Int { - return sections.count + return visibleSections.count } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - var count = sections[section].items.count + var count = visibleSections[section].items.count // swiftlint:disable:next empty_count if count == 0 { count = 1 @@ -167,10 +167,10 @@ class ItemsViewDataSource: BaseReactiveTableViewDataSource { } override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { - if sections.isEmpty { + if visibleSections.isEmpty { return nil } - return sections[section].title + return visibleSections[section].title } override func item(at indexPath: IndexPath?) -> ItemProtocol? { @@ -180,9 +180,9 @@ class ItemsViewDataSource: BaseReactiveTableViewDataSource { if indexPath.item < 0 || indexPath.section < 0 { return nil } - if indexPath.section < sections.count { - if indexPath.item < sections[indexPath.section].items.count { - return sections[indexPath.section].items[indexPath.item] + if indexPath.section < visibleSections.count { + if indexPath.item < visibleSections[indexPath.section].items.count { + return visibleSections[indexPath.section].items[indexPath.item] } } return nil diff --git a/HabitRPG/TableViewDataSources/TimeTravelersCollectionViewDataSource.swift b/HabitRPG/TableViewDataSources/TimeTravelersCollectionViewDataSource.swift index 0790e2eda..f93250f49 100644 --- a/HabitRPG/TableViewDataSources/TimeTravelersCollectionViewDataSource.swift +++ b/HabitRPG/TableViewDataSources/TimeTravelersCollectionViewDataSource.swift @@ -35,6 +35,7 @@ class TimeTravelersCollectionViewDataSource: ShopCollectionViewDataSource { let newItem = inventoryRepository.getNewInAppReward() let key = item.category?.identifier ?? "" newItem.text = item.category?.text + newItem.notes = item.category?.notes ?? item.notes newItem.key = key newItem.pinType = item.pinType ?? "mystery_set" newItem.purchaseType = newItem.pinType diff --git a/HabitRPG/UI/General/MainMenuViewController.swift b/HabitRPG/UI/General/MainMenuViewController.swift index 6f052a81c..b8c404289 100644 --- a/HabitRPG/UI/General/MainMenuViewController.swift +++ b/HabitRPG/UI/General/MainMenuViewController.swift @@ -91,7 +91,7 @@ class MenuItem { MenuItem(key: .market, title: L10n.Locations.market, segue: StoryboardSegue.Main.showMarketSegue.rawValue), MenuItem(key: .questShop, title: L10n.Menu.questShop, segue: StoryboardSegue.Main.showQuestShopSegue.rawValue), MenuItem(key: .seasonalShop, title: L10n.Locations.seasonalShop, segue: StoryboardSegue.Main.showSeasonalShopSegue.rawValue), - MenuItem(key: .customizationShop, title: L10n.Locations.customizations, segue: StoryboardSegue.Main.showCustomizationShopSegue.rawValue, isHidden: true), + MenuItem(key: .customizationShop, title: L10n.Locations.customizations, segue: StoryboardSegue.Main.showCustomizationShopSegue.rawValue), MenuItem(key: .timeTravelersShop, title: L10n.Locations.timeTravelersShop, segue: StoryboardSegue.Main.showTimeTravelersSegue.rawValue), MenuItem(key: .customizeAvatar, title: L10n.Menu.customizeAvatar, vcInstantiator: StoryboardScene.Main.avatarOverviewViewController.instantiate), MenuItem(key: .equipment, title: L10n.Titles.equipment, vcInstantiator: StoryboardScene.Main.equipmentOverviewViewController.instantiate), @@ -388,11 +388,6 @@ class MainMenuViewController: BaseTableViewController { self?.updatePromoCells() }) } - - if configRepository.bool(variable: .enableCustomizationShop) { - menuItem(withKey: .customizationShop).isHidden = false - tableView.reloadData() - } } private func updatePromoCells() { @@ -434,11 +429,7 @@ class MainMenuViewController: BaseTableViewController { case "fall": seasonText = L10n.fall default: - if configRepository.bool(variable: .enableCustomizationShop) { - seasonText = L10n.isOpen - } else { - seasonText = L10n.isClosed - } + seasonText = L10n.isOpen } menuItem(withKey: .seasonalShop).pillText = seasonText tableView.reloadData() diff --git a/Habitica API Client/Habitica API Client/User/SyncUserStatsCall.swift b/Habitica API Client/Habitica API Client/User/SyncUserStatsCall.swift index 329e5a7c3..4de5984ad 100644 --- a/Habitica API Client/Habitica API Client/User/SyncUserStatsCall.swift +++ b/Habitica API Client/Habitica API Client/User/SyncUserStatsCall.swift @@ -12,6 +12,6 @@ import ReactiveSwift public class SyncUserStatsCall: ResponseObjectCall { public init() { - super.init(httpMethod: .GET, endpoint: "user/stat-sync") + super.init(httpMethod: .POST, endpoint: "user/stat-sync") } }