feat: implement chat history, theme customization, and password management

- Added chat history persistence for active rooms with auto-cleanup on stream end.
- Overhauled Settings page with user profile, theme color picker, and password change.
- Added backend API for user password updates.
- Integrated flutter_launcher_icons and updated app icon to 'H' logo.
- Fixed 'Duplicate keys' bug in danmaku by using UniqueKey and filtering historical messages.
- Updated version to 1.0.0-beta3.5 and author info.
This commit is contained in:
2026-03-25 11:48:39 +08:00
parent b2a27f7801
commit a0c5e7590d
21 changed files with 446 additions and 54 deletions

View File

@@ -7,8 +7,15 @@ class ChatMessage {
final String username;
final String content;
final String roomId;
final bool isHistory;
ChatMessage({required this.type, required this.username, required this.content, required this.roomId});
ChatMessage({
required this.type,
required this.username,
required this.content,
required this.roomId,
this.isHistory = false,
});
factory ChatMessage.fromJson(Map<String, dynamic> json) {
return ChatMessage(
@@ -16,6 +23,7 @@ class ChatMessage {
username: json['username'] ?? 'Anonymous',
content: json['content'] ?? '',
roomId: json['room_id'] ?? '',
isHistory: json['is_history'] ?? false,
);
}
@@ -24,6 +32,7 @@ class ChatMessage {
'username': username,
'content': content,
'room_id': roomId,
'is_history': isHistory,
};
}