Files
m8chat-app2/lib/features/rooms/domain/room_model.dart
help4bis 8f13c725a4 feat: Phase 1 complete — Matrix login, rooms, chat, profile
- Direct m.login.password auth against matrix.m8chat.au
- Room list with unread badges, last message, timestamps
- Chat timeline (text, images, files, replies, reactions)
- Profile screen with expandable Notifications and Security sections
- Olm E2EE initialisation (web WASM bootstrap)
- Global error handler preventing Matrix SDK crashes
- GoRouter with refreshListenable (no recreation on auth change)
- Feature-first clean architecture: Riverpod + GoRouter + Drift
- Deployed to https://app2.m8chat.au

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 06:26:57 +10:00

22 lines
635 B
Dart

// Version: 1.0.0 | Created: 2026-04-01
// Immutable room model. Wraps the data the rooms screen needs to display.
// Derived from the Matrix SDK's Room object in the repository layer.
import 'package:freezed_annotation/freezed_annotation.dart';
part 'room_model.freezed.dart';
@freezed
abstract class RoomModel with _$RoomModel {
const factory RoomModel({
required String id,
required String displayName,
String? avatarUrl,
String? lastMessagePreview,
DateTime? lastActivityAt,
@Default(0) int unreadCount,
@Default(false) bool isDirectMessage,
@Default(false) bool isDirect,
}) = _RoomModel;
}