mirror of
https://github.com/Linloir/Simple-TCP-Client.git
synced 2025-12-17 00:38:11 +08:00
Fix Bug
- message list won't save on sending new messages
This commit is contained in:
parent
bc5b8e6aa1
commit
542e78729e
@ -1,13 +1,12 @@
|
||||
/*
|
||||
* @Author : Linloir
|
||||
* @Date : 2022-10-13 14:03:56
|
||||
* @LastEditTime : 2022-10-19 00:37:31
|
||||
* @LastEditTime : 2022-10-19 18:00:37
|
||||
* @Description :
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:convert/convert.dart';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author : Linloir
|
||||
* @Date : 2022-10-12 23:38:31
|
||||
* @LastEditTime : 2022-10-17 17:15:12
|
||||
* @LastEditTime : 2022-10-19 18:02:22
|
||||
* @Description :
|
||||
*/
|
||||
|
||||
@ -82,6 +82,8 @@ class MessageListCubit extends Cubit<MessageListState> {
|
||||
message: message,
|
||||
targetUser: targetUser
|
||||
)));
|
||||
var msgUserList = state.messageList.map((e) => e.targetUser.toString()).toList();
|
||||
pref.setStringList('${currentUserID}msg', msgUserList);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user