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

Display the list of memberships

This commit is contained in:
2020-05-05 19:33:04 +02:00
parent 286639889b
commit c5c544fb34
5 changed files with 130 additions and 5 deletions

View File

@ -35,4 +35,17 @@ class Membership {
friend = null,
assert(groupID != null),
assert(groupLastActive != null);
int get lastActive {
switch (type) {
case MembershipType.FRIEND:
return friend.lastActive;
case MembershipType.GROUP:
return groupLastActive;
case MembershipType.CONVERSATION:
return conversation.lastActive;
default:
throw Exception("Unreachable statment!");
}
}
}