Skip to content

Commit

Permalink
Apply EquatableMixin for EventUpdate class
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Mar 5, 2024
1 parent 599c37a commit 40bab63
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/src/utils/event_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import 'package:equatable/equatable.dart';
import 'package:matrix/matrix.dart';

enum EventUpdateType {
Expand Down Expand Up @@ -43,7 +44,7 @@ enum EventUpdateType {

/// Represents a new event (e.g. a message in a room) or an update for an
/// already known event.
class EventUpdate {
class EventUpdate with EquatableMixin {
/// Usually 'timeline', 'state' or whatever.
final EventUpdateType type;

Expand Down Expand Up @@ -74,4 +75,11 @@ class EventUpdate {
return this;
}
}

@override
List<Object?> get props => [
type,
roomID,
content,
];
}

0 comments on commit 40bab63

Please sign in to comment.