fix missing images heights on month detail
@@ -15,11 +15,12 @@ import Firebase
|
||||
class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
private let savedOnboardingData = UserDefaultsStore.getOnboarding()
|
||||
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
|
||||
|
||||
|
||||
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
// PersistenceController.shared.clearDB()
|
||||
// PersistenceController.shared.deleteLast(numberOfEntries: 5)
|
||||
// GroupUserDefaults.groupDefaults.set(false, forKey: UserDefaultsStore.Keys.showNSFW.rawValue)
|
||||
// PersistenceController.shared.clearDB()
|
||||
// PersistenceController.shared.deleteLast(numberOfEntries: 5)
|
||||
// PersistenceController.shared.deleteRandomFromLast(numberOfEntries: 10)
|
||||
// GroupUserDefaults.groupDefaults.set(false, forKey: UserDefaultsStore.Keys.showNSFW.rawValue)
|
||||
|
||||
FirebaseApp.configure()
|
||||
PersistenceController.shared.removeNoForDates()
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "xmark-solid.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "xmark-solid@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "xmark-solid@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 21 KiB |
@@ -29,4 +29,16 @@ extension PersistenceController {
|
||||
}
|
||||
try! viewContext.save()
|
||||
}
|
||||
|
||||
func deleteRandomFromLast(numberOfEntries: Int) {
|
||||
let entries = PersistenceController.shared.getData(startDate: Calendar.current.date(byAdding: .day, value: -numberOfEntries, to: Date())!,
|
||||
endDate: Date(),
|
||||
includedDays: [])
|
||||
for entry in entries {
|
||||
if Bool.random() {
|
||||
viewContext.delete(entry)
|
||||
}
|
||||
}
|
||||
try! viewContext.save()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,29 +167,27 @@ struct MonthDetailView: View {
|
||||
Text(" ")
|
||||
.font(.title3)
|
||||
.foregroundColor(Mood.placeholder.color)
|
||||
|
||||
Circle()
|
||||
.frame(minWidth: 5,
|
||||
maxWidth: 50,
|
||||
minHeight: 5,
|
||||
maxHeight: 50,
|
||||
alignment: .center)
|
||||
.foregroundColor(moodTint.color(forMood: entry.mood))
|
||||
} else {
|
||||
Text(entry.forDate!,
|
||||
format: Date.FormatStyle().day())
|
||||
.font(.title3)
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
if entry.mood == .placeholder {
|
||||
Circle()
|
||||
.frame(minWidth: 5,
|
||||
maxWidth: 500,
|
||||
minHeight: 5,
|
||||
maxHeight: 500,
|
||||
alignment: .center)
|
||||
.foregroundColor(moodTint.color(forMood: entry.mood))
|
||||
} else {
|
||||
|
||||
entry.mood.icon
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.scaledToFit()
|
||||
.frame(minWidth: 5,
|
||||
maxWidth: 500,
|
||||
maxWidth: 50,
|
||||
minHeight: 5,
|
||||
maxHeight: 500,
|
||||
maxHeight: 50,
|
||||
alignment: .center)
|
||||
.foregroundColor(moodTint.color(forMood: entry.mood))
|
||||
}
|
||||
|
||||