add notification for messages
This commit is contained in:
@@ -18,7 +18,7 @@ class Absence {
|
||||
DateTime lessonEnd;
|
||||
int? lessonIndex;
|
||||
String group;
|
||||
bool hasSeen;
|
||||
bool isSeen;
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
@@ -43,7 +43,7 @@ class Absence {
|
||||
this.lessonIndex,
|
||||
required this.group,
|
||||
this.json,
|
||||
this.hasSeen = false,
|
||||
this.isSeen = false,
|
||||
});
|
||||
|
||||
factory Absence.fromJson(Map json) {
|
||||
@@ -89,7 +89,7 @@ class Absence {
|
||||
lessonIndex: lessonIndex,
|
||||
group:
|
||||
json["OsztalyCsoport"] != null ? json["OsztalyCsoport"]["Uid"] : "",
|
||||
hasSeen: false,
|
||||
isSeen: false,
|
||||
json: json,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ class Message {
|
||||
MessageType? type;
|
||||
List<Recipient> recipients;
|
||||
List<Attachment> attachments;
|
||||
bool isSeen;
|
||||
|
||||
Message({
|
||||
required this.id,
|
||||
@@ -32,7 +33,15 @@ class Message {
|
||||
this.replyId,
|
||||
this.conversationId,
|
||||
this.json,
|
||||
this.isSeen = false,
|
||||
});
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is Message && runtimeType == other.runtimeType && id == other.id;
|
||||
|
||||
@override
|
||||
int get hashCode => id.hashCode;
|
||||
|
||||
factory Message.fromJson(Map json, {MessageType? forceType}) {
|
||||
Map message = json["uzenet"];
|
||||
@@ -69,6 +78,7 @@ class Message {
|
||||
replyId: message["elozoUzenetAzonosito"],
|
||||
conversationId: message["beszelgetesAzonosito"],
|
||||
json: json,
|
||||
isSeen: false,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user