mirror of
https://github.com/Linloir/Simple-TCP-Client.git
synced 2025-12-18 17:28: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
|
* @Author : Linloir
|
||||||
* @Date : 2022-10-13 14:03:56
|
* @Date : 2022-10-13 14:03:56
|
||||||
* @LastEditTime : 2022-10-19 00:37:31
|
* @LastEditTime : 2022-10-19 18:00:37
|
||||||
* @Description :
|
* @Description :
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:convert/convert.dart';
|
import 'package:convert/convert.dart';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author : Linloir
|
* @Author : Linloir
|
||||||
* @Date : 2022-10-12 23:38:31
|
* @Date : 2022-10-12 23:38:31
|
||||||
* @LastEditTime : 2022-10-17 17:15:12
|
* @LastEditTime : 2022-10-19 18:02:22
|
||||||
* @Description :
|
* @Description :
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -82,6 +82,8 @@ class MessageListCubit extends Cubit<MessageListState> {
|
|||||||
message: message,
|
message: message,
|
||||||
targetUser: targetUser
|
targetUser: targetUser
|
||||||
)));
|
)));
|
||||||
|
var msgUserList = state.messageList.map((e) => e.targetUser.toString()).toList();
|
||||||
|
pref.setStringList('${currentUserID}msg', msgUserList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user