提交 104d31dd authored 作者: songchuancai's avatar songchuancai

隐藏历史会话

上级 0769eaf3
...@@ -110,15 +110,17 @@ class _HomePageState extends State<HomePage> { ...@@ -110,15 +110,17 @@ class _HomePageState extends State<HomePage> {
_conversations = await _storageService.getConversations(); _conversations = await _storageService.getConversations();
if (_conversations.isEmpty) { // 每次进入应用创建一个新的会话
_createNewConversation(); _createNewConversation();
} else { // if (_conversations.isEmpty) {
_currentConversation = _conversations.first; // _createNewConversation();
// } else {
setState(() { // _currentConversation = _conversations.first;
messages = _currentConversation.messages;
}); // setState(() {
} // messages = _currentConversation.messages;
// });
// }
} }
Future<void> _createNewConversation() async { Future<void> _createNewConversation() async {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论