diff --git a/HabitRPG/Extensions/UIColor-Habitica.swift b/HabitRPG/Extensions/UIColor-Habitica.swift index 04b6bb5cd..ee19b2288 100644 --- a/HabitRPG/Extensions/UIColor-Habitica.swift +++ b/HabitRPG/Extensions/UIColor-Habitica.swift @@ -89,7 +89,7 @@ extension UIColor { case "warrior": return .maroon50 case "healer": - return .yellow10 + return .yellow50 case "mage", "wizard": return .blue10 case "rogue": diff --git a/HabitRPG/Habitica-Info.plist b/HabitRPG/Habitica-Info.plist index fc074af5a..899cff76f 100644 --- a/HabitRPG/Habitica-Info.plist +++ b/HabitRPG/Habitica-Info.plist @@ -39,7 +39,7 @@ CFBundleVersion - 979 + 982 CustomDomain ${CUSTOM_DOMAIN} DisableSSL diff --git a/HabitRPG/LoadingViewController.swift b/HabitRPG/LoadingViewController.swift index 48d29c5ff..19628e622 100644 --- a/HabitRPG/LoadingViewController.swift +++ b/HabitRPG/LoadingViewController.swift @@ -63,6 +63,9 @@ class LoadingViewController: UIHostingController { .flatMap(.latest, {[weak self] (_) in return self?.userRepository?.retrieveInboxConversations() ?? Signal.empty }) + .flatMap(.latest, {[weak self] (_) in + return self?.userRepository?.retrieveInAppRewards() ?? Signal.empty + }) .observeCompleted { [weak self] in self?.userRepository = nil if !hasUserData { diff --git a/HabitRPG/Storyboards/Base.lproj/Shop.storyboard b/HabitRPG/Storyboards/Base.lproj/Shop.storyboard index 0ddbac4fe..900cf3cb6 100644 --- a/HabitRPG/Storyboards/Base.lproj/Shop.storyboard +++ b/HabitRPG/Storyboards/Base.lproj/Shop.storyboard @@ -33,8 +33,8 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -60,8 +108,11 @@ - - + + + + + @@ -200,6 +251,7 @@ + diff --git a/HabitRPG/TableViewDataSources/SeasonalShopCollectionViewDataSource.swift b/HabitRPG/TableViewDataSources/SeasonalShopCollectionViewDataSource.swift index efba04dd3..92a35b896 100644 --- a/HabitRPG/TableViewDataSources/SeasonalShopCollectionViewDataSource.swift +++ b/HabitRPG/TableViewDataSources/SeasonalShopCollectionViewDataSource.swift @@ -14,7 +14,7 @@ class SeasonalShopCollectionViewDataSource: ShopCollectionViewDataSource { override func loadCategories(_ categories: [ShopCategoryProtocol]) { sections.removeAll() for category in categories.sorted(by: { category1, category2 in - return (category1.items.first?.currency == "gold" ? 1 : 0) > (category2.items.first?.currency == "gold" ? 1 : 0) + return (category1.items.first?.currency == "gold" ? 1 : 0, category1.identifier == "quests" ? 10000 : findReleaseYear(key: category1.items.first?.key ?? "")) > (category2.items.first?.currency == "gold" ? 1 : 0, category1.identifier == "quests" ? 10000 : findReleaseYear(key: category2.items.first?.key ?? "")) }) { let newSection = ItemSection(title: category.text) newSection.items = category.items @@ -23,4 +23,13 @@ class SeasonalShopCollectionViewDataSource: ShopCollectionViewDataSource { } collectionView?.reloadData() } + + private func findReleaseYear(key: String) -> Int { + let result = key.filter({ $0.isNumber }) + if result.isEmpty { + return 2014 + } else { + return Int(result) ?? 0 + } + } } diff --git a/HabitRPG/TableViewDataSources/ShopCollectionViewDataSource.swift b/HabitRPG/TableViewDataSources/ShopCollectionViewDataSource.swift index eb8679590..e61674bbf 100644 --- a/HabitRPG/TableViewDataSources/ShopCollectionViewDataSource.swift +++ b/HabitRPG/TableViewDataSources/ShopCollectionViewDataSource.swift @@ -267,7 +267,7 @@ class ShopCollectionViewDataSource: BaseReactiveCollectionViewDataSource CGSize { if indexPath.section == 0 && needsGearSection { if !hasGearSection() { - return CGSize(width: collectionView.bounds.width, height: 100) + return CGSize(width: collectionView.bounds.width, height: 200) } } let section = visibleSections[indexPath.section] @@ -309,11 +309,23 @@ class ShopCollectionViewDataSource: BaseReactiveCollectionViewDataSourceCFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 979 + 982 NSExtension NSExtensionAttributes diff --git a/Habitica IntentsUI/Info.plist b/Habitica IntentsUI/Info.plist index 8cd42269c..65d65af98 100644 --- a/Habitica IntentsUI/Info.plist +++ b/Habitica IntentsUI/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 979 + 982 NSExtension NSExtensionAttributes diff --git a/Habitica Snapshots/Info.plist b/Habitica Snapshots/Info.plist index 84e2964ac..ee3b2dfef 100644 --- a/Habitica Snapshots/Info.plist +++ b/Habitica Snapshots/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 979 + 982 diff --git a/Habitica Widgets/Info.plist b/Habitica Widgets/Info.plist index 511e151b6..054beb695 100644 --- a/Habitica Widgets/Info.plist +++ b/Habitica Widgets/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 979 + 982 NSExtension NSExtensionPointIdentifier diff --git a/Habitica.xcodeproj/project.pbxproj b/Habitica.xcodeproj/project.pbxproj index 2d412e6a5..cca3f3a81 100644 --- a/Habitica.xcodeproj/project.pbxproj +++ b/Habitica.xcodeproj/project.pbxproj @@ -3985,7 +3985,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -4016,7 +4016,7 @@ CODE_SIGN_ENTITLEMENTS = Habitica.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO; DEVELOPMENT_TEAM = 9Q9SMRMCNN; ENABLE_BITCODE = NO; @@ -4168,7 +4168,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4210,7 +4210,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4254,7 +4254,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4293,7 +4293,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4346,7 +4346,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -4377,7 +4377,7 @@ CODE_SIGN_ENTITLEMENTS = Habitica.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO; DEVELOPMENT_TEAM = 9Q9SMRMCNN; ENABLE_BITCODE = NO; @@ -4529,7 +4529,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4571,7 +4571,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4615,7 +4615,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4654,7 +4654,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4685,7 +4685,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4719,7 +4719,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4756,7 +4756,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4803,7 +4803,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4844,7 +4844,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4887,7 +4887,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4928,7 +4928,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -4973,7 +4973,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 9Q9SMRMCNN; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -5183,7 +5183,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -5241,7 +5241,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -5272,7 +5272,7 @@ CODE_SIGN_ENTITLEMENTS = Habitica.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO; DEVELOPMENT_TEAM = 9Q9SMRMCNN; ENABLE_BITCODE = NO; @@ -5346,7 +5346,7 @@ CODE_SIGN_ENTITLEMENTS = Habitica.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 979; + CURRENT_PROJECT_VERSION = 982; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO; DEVELOPMENT_TEAM = 9Q9SMRMCNN; ENABLE_BITCODE = NO; diff --git a/HabiticaTests/Info.plist b/HabiticaTests/Info.plist index 3318304fd..4f9ebac87 100644 --- a/HabiticaTests/Info.plist +++ b/HabiticaTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 979 + 982