|
|
|
@ -10,7 +10,6 @@ import 'package:flutter/rendering.dart';
|
|
|
|
|
import 'package:flutter/services.dart'; |
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
import 'package:huixiang/im/database/message.dart'; |
|
|
|
|
import 'package:huixiang/im/im_view/w_popup_menu.dart'; |
|
|
|
|
import 'package:huixiang/main.dart'; |
|
|
|
|
import 'package:huixiang/retrofit/data/im_user.dart'; |
|
|
|
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
|
|
@ -125,7 +124,8 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
|
|
|
|
|
Future messageShowTime() async { |
|
|
|
|
List<Message> messagePages = await hxDatabase.queryTList(conversation); |
|
|
|
|
for (var value in messages) { |
|
|
|
|
Message message = messagePages.firstWhere((element) => value.id == element.id, orElse: () => null); |
|
|
|
|
Message message = messagePages |
|
|
|
|
.firstWhere((element) => value.id == element.id, orElse: () => null); |
|
|
|
|
value.showTime = message != null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -143,8 +143,10 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (apiService == null) |
|
|
|
|
apiService = ApiService(Dio(), context: context, token: value.getString("token")); |
|
|
|
|
BaseData<UserInfo> baseData = await apiService.queryInfo().catchError((onError) {}); |
|
|
|
|
apiService = |
|
|
|
|
ApiService(Dio(), context: context, token: value.getString("token")); |
|
|
|
|
BaseData<UserInfo> baseData = |
|
|
|
|
await apiService.queryInfo().catchError((onError) {}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
userInfo = baseData.data; |
|
|
|
@ -328,6 +330,7 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
|
|
|
|
|
onTap: () { |
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); |
|
|
|
|
setState(() { |
|
|
|
|
needShowSmiley = false; |
|
|
|
|
emojiShowing = false; |
|
|
|
|
isKeyBoardShow = emojiShowing; |
|
|
|
|
moreShow = false; |
|
|
|
|