Skip to content

Commit

Permalink
fix(Venus): show all categories when venus flag is true
Browse files Browse the repository at this point in the history
  • Loading branch information
tripleCC committed Apr 30, 2016
1 parent a0d2d8d commit 2aa8054
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class TPCCategoryViewController: TPCViewController {
}

private func setupChildController() {
let titles = TPCStorageUtil.objectForKey(TPCCategoryStoreKey) as? [String] ?? TPCConfiguration.allCategories
let titles = TPCStorageUtil.objectForKey(TPCCategoryStoreKey) as? [String] ?? (TPCConfiguration.allCategories.filter {!TPCFilterCategories.contains($0)})
// 福利单独出来
titles.filter{ $0 != "福利" }.forEach {
let subCategoryVc = TPCSubCategoryViewController()
Expand Down
2 changes: 1 addition & 1 deletion GanHuo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>17</string>
<string>19</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>pocket-oauth-v1</string>
Expand Down
8 changes: 5 additions & 3 deletions GanHuo/Util/TPCVenusUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,18 @@ class TPCVenusUtil {
TPCConfiguration.allRules.removeAtIndex(TPCConfiguration.allRules.indexOf(TPCRuleType.One)!)
TPCConfiguration.allCategories = TPCConfiguration.allCategories.filter{ !TPCFilterCategories.contains($0) }
TPCConfiguration.loadDataCountOnce = 5
TPCStorageUtil.setObject(nil, forKey: TPCCategoryStoreKey)
TPCStorageUtil.setObject(nil, forKey: TPCAllCategoriesKey, suiteName: TPCAppGroupKey)
} else {
debugPrint("Open venus model")
// Clear github image url cache when get true venusFlag at first time
TPCStorageUtil.shareInstance.clearFileCache()
KingfisherManager.sharedManager.cache.clearDiskCache()
KingfisherManager.sharedManager.cache.clearMemoryCache()
TPCStorageUtil.setObject(nil, forKey: TPCCategoryStoreKey)
// 给SE用,这里代码不是很好
TPCStorageUtil.setObject(TPCConfiguration.allCategories, forKey: TPCAllCategoriesKey, suiteName: TPCAppGroupKey)
TPCStorageUtil.setObject(TPCConfiguration.allCategories, forKey: TPCCategoryStoreKey)
}
// 给SE用,这里代码不是很好
TPCStorageUtil.setObject(TPCConfiguration.allCategories, forKey: TPCAllCategoriesKey, suiteName: TPCAppGroupKey)
}
completion(launchConfig: launchConfig)
}
Expand Down
2 changes: 1 addition & 1 deletion GanHuoShareExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>17</string>
<string>19</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down

0 comments on commit 2aa8054

Please sign in to comment.