Implement local date via intl
We don't want to display utc
This commit is contained in:
@@ -800,7 +800,7 @@ class MainPageState extends State<MainPage> with WindowListener {
|
||||
vertical: 2,
|
||||
), // Tighter padding
|
||||
title: Text(
|
||||
note.date,
|
||||
note.displayDate,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize:
|
||||
@@ -839,7 +839,7 @@ class MainPageState extends State<MainPage> with WindowListener {
|
||||
|
||||
// Navigate to the selected note
|
||||
Navigator.of(context).pop();
|
||||
this.setState(() {
|
||||
setState(() {
|
||||
_currentlyDisplayedNote = note;
|
||||
_previousEntryController.text =
|
||||
note.content;
|
||||
@@ -1051,10 +1051,10 @@ class MainPageState extends State<MainPage> with WindowListener {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
_currentlyDisplayedNote?.date ==
|
||||
previousNote?.date
|
||||
_currentlyDisplayedNote?.displayDate ==
|
||||
previousNote?.displayDate
|
||||
? 'Previous Entry (Latest)'
|
||||
: 'Entry: ${_currentlyDisplayedNote?.date ?? 'N/A'}',
|
||||
: 'Entry: ${_currentlyDisplayedNote?.displayDate ?? 'N/A'}',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.grey,
|
||||
@@ -1083,17 +1083,17 @@ class MainPageState extends State<MainPage> with WindowListener {
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
decoration: InputDecoration(
|
||||
hintText:
|
||||
_currentlyDisplayedNote?.date !=
|
||||
previousNote?.date
|
||||
? 'Viewing note from ${_currentlyDisplayedNote?.date} (Editable)'
|
||||
_currentlyDisplayedNote?.displayDate !=
|
||||
previousNote?.displayDate
|
||||
? 'Viewing note from ${_currentlyDisplayedNote?.displayDate} (Editable)'
|
||||
: 'Latest Note',
|
||||
border: const OutlineInputBorder(),
|
||||
filled:
|
||||
_currentlyDisplayedNote?.date !=
|
||||
previousNote?.date,
|
||||
_currentlyDisplayedNote?.displayDate !=
|
||||
previousNote?.displayDate,
|
||||
fillColor:
|
||||
_currentlyDisplayedNote?.date !=
|
||||
previousNote?.date
|
||||
_currentlyDisplayedNote?.displayDate !=
|
||||
previousNote?.displayDate
|
||||
? Colors.grey.withOpacity(0.1)
|
||||
: null,
|
||||
),
|
||||
|
Reference in New Issue
Block a user