Skip to content

Commit c7bff99

Browse files
authored
contribution 파싱에러 수정 (#78)
contribution 파싱에러 수정
1 parent 73127fe commit c7bff99

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

GitTime/Sources/ViewControllers/Activity/ActivityViewReactor.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,18 +263,15 @@ final class ActivityViewReactor: ReactorKit.Reactor {
263263
if let doc = try? HTML(html: response.data, encoding: .utf8) {
264264
for rect in doc.css("rect") {
265265
if var date = rect["data-date"],
266-
var count = rect["data-count"],
267266
let dataLevel = rect["data-level"] {
268267

269268
date = date.replacingOccurrences(of: "\\", with: "")
270269
.replacingOccurrences(of: "/", with: "")
271270
.replacingOccurrences(of: "\"", with: "")
272-
count = count.replacingOccurrences(of: "\\", with: "")
273-
.replacingOccurrences(of: "\"", with: "")
274271

275272
let colorType = ContributionHexColorTypes.allCases.first { $0.rawValue == Int(dataLevel) }
276273
if let hexString = colorType?.hexString {
277-
contributions.append(Contribution(date: date, contribution: Int(count)!, hexColor: hexString))
274+
contributions.append(Contribution(date: date, contribution: Int(dataLevel)!, hexColor: hexString))
278275
}
279276
}
280277
}

GitTime/Sources/ViewControllers/Buddy/BuddyViewReactor.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,18 +257,15 @@ final class BuddyViewReactor: Reactor {
257257
if let doc = try? HTML(html: response.data, encoding: .utf8) {
258258
for rect in doc.css("rect") {
259259
if var date = rect["data-date"],
260-
var count = rect["data-count"],
261260
let dataLevel = rect["data-level"] {
262261

263262
date = date.replacingOccurrences(of: "\\", with: "")
264263
.replacingOccurrences(of: "/", with: "")
265264
.replacingOccurrences(of: "\"", with: "")
266-
count = count.replacingOccurrences(of: "\\", with: "")
267-
.replacingOccurrences(of: "\"", with: "")
268265

269266
let colorType = ContributionHexColorTypes.allCases.first { $0.rawValue == Int(dataLevel) }
270267
if let hexString = colorType?.hexString {
271-
contributions.append(Contribution(date: date, contribution: Int(count)!, hexColor: hexString))
268+
contributions.append(Contribution(date: date, contribution: Int(dataLevel)!, hexColor: hexString))
272269
}
273270
}
274271
}

GitTime/Supporting Files/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<key>CFBundlePackageType</key>
8686
<string>APPL</string>
8787
<key>CFBundleShortVersionString</key>
88-
<string>2.1.4</string>
88+
<string>2.1.5</string>
8989
<key>CFBundleURLTypes</key>
9090
<array>
9191
<dict>
@@ -100,7 +100,7 @@
100100
</dict>
101101
</array>
102102
<key>CFBundleVersion</key>
103-
<string>3</string>
103+
<string>4</string>
104104
<key>ITSAppUsesNonExemptEncryption</key>
105105
<false/>
106106
<key>LSApplicationQueriesSchemes</key>

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,4 +332,4 @@ SPEC CHECKSUMS:
332332

333333
PODFILE CHECKSUM: 889e35fd688c78c4e6f036a683a2aed3bbd554c6
334334

335-
COCOAPODS: 1.11.2
335+
COCOAPODS: 1.11.3

0 commit comments

Comments
 (0)