Skip to content
Merged
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ private extension SiteStatsPeriodViewModel {
case .unknown:
icon = Style.imageForGridiconType(.posts)
}

return StatsTotalRowData(name: $0.title,

data: $0.viewsCount.abbreviatedString(),
dataBarPercent: Float($0.viewsCount) / Float(postsAndPages.first!.viewsCount),
icon: icon,
Expand Down Expand Up @@ -247,7 +247,7 @@ private extension SiteStatsPeriodViewModel {
func countriesDataRows() -> [StatsTotalRowData] {
return store.getTopCountries()?.countries.prefix(10).map { StatsTotalRowData(name: $0.name,
data: $0.viewsCount.abbreviatedString(),
countryIconURL: nil, // TODO Move this from WPStatsiOS.
icon: UIImage(named: $0.code),
statSection: .periodCountries) }
?? []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ private extension SiteStatsDetailsViewModel {
func countriesRows() -> [StatsTotalRowData] {
return periodStore.getTopCountries()?.countries.map { StatsTotalRowData(name: $0.name,
data: $0.viewsCount.abbreviatedString(),
countryIconURL: nil, //$0.iconURL // TODO FIXME Move this from WPiOSStats
icon: UIImage(named: $0.code),
statSection: .periodCountries) }
?? []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ struct StatsTotalRowData {
var icon: UIImage?
var socialIconURL: URL?
var userIconURL: URL?
var countryIconURL: URL?
var nameDetail: String?
var showDisclosure: Bool
var disclosureURL: URL?
Expand All @@ -22,7 +21,6 @@ struct StatsTotalRowData {
icon: UIImage? = nil,
socialIconURL: URL? = nil,
userIconURL: URL? = nil,
countryIconURL: URL? = nil,
nameDetail: String? = nil,
showDisclosure: Bool = false,
disclosureURL: URL? = nil,
Expand All @@ -36,7 +34,6 @@ struct StatsTotalRowData {
self.icon = icon
self.socialIconURL = socialIconURL
self.userIconURL = userIconURL
self.countryIconURL = countryIconURL
self.showDisclosure = showDisclosure
self.disclosureURL = disclosureURL
self.childRows = childRows
Expand Down Expand Up @@ -135,7 +132,7 @@ class StatsTotalRow: UIView, NibLoadable {
guard let rowData = rowData else {
return false
}
return rowData.icon != nil || rowData.socialIconURL != nil || rowData.userIconURL != nil || rowData.countryIconURL != nil
return rowData.icon != nil || rowData.socialIconURL != nil || rowData.userIconURL != nil
}

// MARK: - Configure
Expand Down Expand Up @@ -220,11 +217,6 @@ private extension StatsTotalRow {

downloadImageFrom(iconURL)
}

if let iconURL = rowData.countryIconURL {
imageWidthConstraint.constant = Constants.defaultImageSize
downloadImageFrom(iconURL)
}
}

func configureDataBar() {
Expand Down
Binary file added WordPress/Flags.xcassets/AC.imageset/AC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AC.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AC.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AD.imageset/AD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AD.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AD.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AE.imageset/AE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AE.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AE.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AF.imageset/AF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AF.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AF.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AG.imageset/AG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AG.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AG.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AI.imageset/AI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AI.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AI.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AL.imageset/AL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AL.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AL.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AM.imageset/AM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AM.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AM.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AO.imageset/AO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AO.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AO.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AQ.imageset/AQ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AQ.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AQ.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AR.imageset/AR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AR.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AR.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AS.imageset/AS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AS.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AS.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AT.imageset/AT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AT.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AT.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AU.imageset/AU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions WordPress/Flags.xcassets/AU.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "AU.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added WordPress/Flags.xcassets/AW.imageset/AW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading