File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ class StateContainerState extends State<StateContainer> {
154
154
}
155
155
156
156
void removeNote (Note note) {
157
+ // FIXME: What if the Note hasn't yet been saved?
157
158
note.parent.remove (note);
158
159
_gitRepo.removeNote (note.filePath).then ((NoteRepoResult _) async {
159
160
// FIXME: Is there a way of figuring this amount dynamically?
Original file line number Diff line number Diff line change @@ -77,9 +77,8 @@ class JournalList extends StatelessWidget {
77
77
var title = note.title;
78
78
Widget titleWidget = Text (title, style: textTheme.title);
79
79
if (title.isEmpty) {
80
- var date = note.created;
81
- if (date != null && date.year < 10 ) date = note.modified;
82
- if (date != null && date.year > 10 ) {
80
+ var date = note.modified ?? note.created;
81
+ if (date != null ) {
83
82
var formatter = DateFormat ('dd MMM, yyyy ' );
84
83
var dateStr = formatter.format (date);
85
84
You can’t perform that action at this time.
0 commit comments