Skip to content

Commit

Permalink
Realm Migration
Browse files Browse the repository at this point in the history
  • Loading branch information
presto95 committed Mar 13, 2019
1 parent deda29a commit 9ea427a
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"red" : "118",
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000"
"blue" : "164",
"green" : "117"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"red" : "107",
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000"
"blue" : "138",
"green" : "124"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x1D",
"red" : "0.114",
"alpha" : "1.000",
"blue" : "0xD2",
"green" : "0xB4"
"blue" : "0.824",
"green" : "0.706"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"red" : "36",
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000"
"blue" : "102",
"green" : "66"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion RespectU/Resources/SwiftGen/Assets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ internal enum Asset {
internal static let popMixing = ColorAsset(name: "popMixing")
internal static let rSide = ColorAsset(name: "rSide")
internal static let tSide = ColorAsset(name: "tSide")
internal static let portable1 = ColorAsset(name: "portable1")
internal static let bs = ColorAsset(name: "bs")
internal static let ce = ColorAsset(name: "ce")
internal static let portable1 = ColorAsset(name: "portable1")
internal static let portable2 = ColorAsset(name: "portable2")
internal static let respect = ColorAsset(name: "respect")
internal static let technika1 = ColorAsset(name: "technika1")
Expand Down
2 changes: 1 addition & 1 deletion RespectU/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
config.fileURL = fileURL.deletingLastPathComponent().appendingPathComponent("new.realm")
config.schemaVersion = 1
config.migrationBlock = { migration, oldSchemaVersion in
if oldSchemaVersion < 1 {
if oldSchemaVersion < 2 {

}
}
Expand Down
1 change: 1 addition & 0 deletions RespectU/Sources/Utils/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ final class Utils {
return (totalSkillPoint, highestSeries)
case .button5:
let sorted = results.sorted(byKeyPath: "button5.skillPoint", ascending: false)
print(sorted)
let totalSkillPoint = sorted[0..<50].map { $0.button5?.skillPoint ?? 0 }.reduce(0, +)
let highestSeries = Series(rawValue: sorted.first?.series ?? "")
UserDefaults.standard.do {
Expand Down
264 changes: 129 additions & 135 deletions RespectU/Sources/ViewControllers/InitViewController.swift

Large diffs are not rendered by default.

0 comments on commit 9ea427a

Please sign in to comment.