mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-27 05:18:50 +00:00
27 lines
589 B
Dart
27 lines
589 B
Dart
import 'dart:collection';
|
|
|
|
import 'package:comunic/models/comment.dart';
|
|
|
|
/// Comments list
|
|
///
|
|
/// Contains the list of comments for a post
|
|
///
|
|
/// @author Pierre HUBERT
|
|
|
|
class CommentsList extends ListBase<Comment> {
|
|
List<Comment> _list = List();
|
|
|
|
int get length => _list.length;
|
|
|
|
set length(int l) => _list.length = l;
|
|
|
|
@override
|
|
Comment operator [](int index) => _list[index];
|
|
|
|
@override
|
|
void operator []=(int index, Comment value) => _list[index] = value;
|
|
|
|
/// Get the list of users in this comments, as a set
|
|
Set<int> get usersID => map((f) => f.userID).toSet();
|
|
}
|