Skip to content

Commit

Permalink
changed the field tags [String?] on UserNotes to [List<String>? tags]
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfogoulart committed Sep 10, 2023
1 parent 59d98a3 commit cfe072c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .timetracker
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"total":3077,"sessions":[{"begin":"2023-08-20T12:25:12-03:00","end":"2023-08-20T12:38:21-03:00","duration":788},{"begin":"2023-08-20T12:40:44-03:00","end":"2023-08-20T12:41:29-03:00","duration":44},{"begin":"2023-08-21T09:24:56-03:00","end":"2023-08-21T09:27:24-03:00","duration":147},{"begin":"2023-08-21T10:11:41-03:00","end":"2023-08-21T10:17:06-03:00","duration":325},{"begin":"2023-08-23T14:14:46-03:00","end":"2023-08-23T14:28:54-03:00","duration":847},{"begin":"2023-08-23T16:30:40-03:00","end":"2023-08-23T16:30:41-03:00","duration":0},{"begin":"2023-08-27T10:43:01-03:00","end":"2023-08-27T10:47:34-03:00","duration":272},{"begin":"2023-08-27T10:54:48-03:00","end":"2023-08-27T10:55:20-03:00","duration":32},{"begin":"2023-09-09T22:28:25-03:00","end":"2023-09-09T22:35:03-03:00","duration":398},{"begin":"2023-09-09T22:39:43-03:00","end":"2023-09-09T22:43:27-03:00","duration":224}]}
{"total":3856,"sessions":[{"begin":"2023-08-20T12:25:12-03:00","end":"2023-08-20T12:38:21-03:00","duration":788},{"begin":"2023-08-20T12:40:44-03:00","end":"2023-08-20T12:41:29-03:00","duration":44},{"begin":"2023-08-21T09:24:56-03:00","end":"2023-08-21T09:27:24-03:00","duration":147},{"begin":"2023-08-21T10:11:41-03:00","end":"2023-08-21T10:17:06-03:00","duration":325},{"begin":"2023-08-23T14:14:46-03:00","end":"2023-08-23T14:28:54-03:00","duration":847},{"begin":"2023-08-23T16:30:40-03:00","end":"2023-08-23T16:30:41-03:00","duration":0},{"begin":"2023-08-27T10:43:01-03:00","end":"2023-08-27T10:47:34-03:00","duration":272},{"begin":"2023-08-27T10:54:48-03:00","end":"2023-08-27T10:55:20-03:00","duration":32},{"begin":"2023-09-09T22:28:25-03:00","end":"2023-09-09T22:35:03-03:00","duration":398},{"begin":"2023-09-09T22:39:43-03:00","end":"2023-09-09T22:43:27-03:00","duration":224},{"begin":"2023-09-09T22:49:05-03:00","end":"2023-09-09T22:55:39-03:00","duration":394},{"begin":"2023-09-09T23:13:58-03:00","end":"2023-09-09T23:17:07-03:00","duration":188},{"begin":"2023-09-09T23:25:12-03:00","end":"2023-09-09T23:28:30-03:00","duration":197}]}
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
## 0.0.3
* enum translation strings

## 0.0.3
## 0.0.4
* add field [List<Reference>? references] to UserNotes
* Field is used to store the references of the note
* Field is used to store the references of the note

## 0.0.5
* changed the field tags [String?] on UserNotes to [List<String>? tags]
10 changes: 5 additions & 5 deletions lib/model/user/notes/user.notes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum TypeNotes {
class UserNotes {
int id;
String? title;
String? tags;
List<String>? tags;
String? notes;
DateTime date;
TypeNotes? type;
Expand All @@ -51,7 +51,7 @@ class UserNotes {
UserNotes copyWith({
int? id,
String? title,
String? tags,
List<String>? tags,
String? notes,
DateTime? date,
TypeNotes? type,
Expand Down Expand Up @@ -82,7 +82,7 @@ class UserNotes {
return other is UserNotes &&
other.id == id &&
other.title == title &&
other.tags == tags &&
listEquals(other.tags, tags) &&
other.notes == notes &&
other.date == date &&
other.type == type &&
Expand Down Expand Up @@ -123,7 +123,7 @@ class UserNotes {
result.addAll({'color': color!.value});
}
if (references != null) {
result.addAll({'references': references!.map((x) => x.toMap()).toList()});
result.addAll({'references': references!.map((x) => x?.toMap()).toList()});
}

return result;
Expand All @@ -133,7 +133,7 @@ class UserNotes {
return UserNotes(
id: map['id']?.toInt() ?? 0,
title: map['title'],
tags: map['tags'],
tags: List<String>.from(map['tags']),
notes: map['notes'],
date: DateTime.fromMillisecondsSinceEpoch(map['date']),
type: map['type'] != null ? TypeNotes.fromMap(map['type']) : null,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: aletheia_core_model
description: Aletheia Core Model
version: 0.0.4
version: 0.0.5
homepage: https://biblealetheia.com

environment:
Expand Down

0 comments on commit cfe072c

Please sign in to comment.