WIP - a lot of uncommitted work
This commit is contained in:
@@ -23,13 +23,15 @@ struct AddMoodHeaderView: View {
|
||||
.foregroundColor(Color(UIColor.label))
|
||||
.padding()
|
||||
HStack{
|
||||
ForEach(Mood.allValues) { mood in
|
||||
ForEach(Mood.allValues.reversed()) { mood in
|
||||
VStack {
|
||||
Button(action: {
|
||||
addItem(withMoodValue: mood.rawValue)
|
||||
}, label: {
|
||||
mood.icon
|
||||
.font(.system(size: 50))
|
||||
.resizable()
|
||||
.frame(width: 50, height: 50, alignment: .center)
|
||||
.foregroundColor(mood.color)
|
||||
})
|
||||
|
||||
//Text(mood.strValue)
|
||||
@@ -50,7 +52,7 @@ struct AddMoodHeaderView: View {
|
||||
let newItem = MoodEntry(context: viewContext)
|
||||
newItem.timestamp = Date()
|
||||
newItem.moodValue = Int16(moodValue)
|
||||
newItem.date = Date()
|
||||
newItem.forDate = Date()
|
||||
|
||||
do {
|
||||
try viewContext.save()
|
||||
|
||||
Reference in New Issue
Block a user