mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-20 06:39:22 +08:00
@ -93,3 +93,15 @@ String toCurlCommand(String url, Map<String, String> headers) {
|
||||
Future<void> shareNote(Note note) async {
|
||||
return Share.share(note.body);
|
||||
}
|
||||
|
||||
Future<Note> getTodayJournalEntry(NotesFolderFS rootFolder) async {
|
||||
var today = DateTime.now();
|
||||
var matches = await rootFolder.matchNotes((n) async {
|
||||
var dt = n.created;
|
||||
return dt.year == today.year &&
|
||||
dt.month == today.month &&
|
||||
dt.day == today.day;
|
||||
});
|
||||
|
||||
return matches.isNotEmpty ? matches[0] : null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user