1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Finish to fix notices

This commit is contained in:
2022-03-11 17:16:46 +01:00
parent 48c9ee37b6
commit 9e6d3761fe
8 changed files with 11 additions and 34 deletions

View File

@ -1,5 +1,3 @@
/// Single custom emoji information
///
/// @author Pierre Hubert
@ -15,10 +13,7 @@ class CustomEmoji {
required int this.userID,
required String this.shortcut,
required String this.url,
}) : assert(id != null),
assert(userID != null),
assert(shortcut != null),
assert(url != null);
});
Map<String, dynamic> toMap() => {
"id": id,

View File

@ -1,5 +1,3 @@
/// Single presence information
///
/// @author Pierre Hubert
@ -15,15 +13,10 @@ class Presence {
required this.year,
required this.month,
required this.day,
}) : assert(userID != null),
assert(year != null),
assert(month != null),
assert(day != null);
});
Presence.fromDateTime(DateTime dt, this.userID)
: assert(dt != null),
year = dt.year,
: year = dt.year,
month = dt.month,
day = dt.day,
assert(userID != null);
day = dt.day;
}

View File

@ -18,12 +18,7 @@ class Friend extends CacheModel implements Comparable<Friend> {
required int this.lastActive,
required this.following,
required this.canPostTexts,
}) : assert(id != null),
assert(accepted != null),
assert(lastActive != null),
assert(following != null),
assert(canPostTexts != null),
super(id: id);
}) : super(id: id);
/// Check out whether friend is connected or not
bool get isConnected => time() - 30 < lastActive!;
@ -41,8 +36,7 @@ class Friend extends CacheModel implements Comparable<Friend> {
};
Friend.fromMap(Map<String, dynamic> map)
: assert(map != null),
accepted = map[FriendsListTableContract.C_ACCEPTED] == 1,
: accepted = map[FriendsListTableContract.C_ACCEPTED] == 1,
lastActive = map[FriendsListTableContract.C_LAST_ACTIVE],
following = map[FriendsListTableContract.C_FOLLOWING] == 1,
canPostTexts = map[FriendsListTableContract.C_CAN_POST_TEXTS] == 1,

View File

@ -17,8 +17,7 @@ class NewConversationMessage {
required this.message,
this.file,
this.thumbnail,
}) : assert(conversationID != null),
assert(file != null || message != null);
}) : assert(file != null || message != null);
bool get hasMessage => message != null;