Browse Source

个人主页关注按钮点击事件处理;

关注提示处理;
聊天页面聊天信息跟头像位置显示优化处理;
wr_202303
wurong 4 months ago
parent
commit
51aeca7b2e
  1. 13
      lib/im/chat_details_page.dart
  2. 11
      lib/mine/personal_page.dart

13
lib/im/chat_details_page.dart

@ -10,6 +10,7 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/im/database/message.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/main.dart';
import 'package:huixiang/retrofit/data/im_user.dart'; import 'package:huixiang/retrofit/data/im_user.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
@ -569,6 +570,7 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
Padding( Padding(
padding: EdgeInsets.only(left: 17.w, right: 39.w), padding: EdgeInsets.only(left: 17.w, right: 39.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
GestureDetector( GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
@ -727,6 +729,7 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
Padding( Padding(
padding: EdgeInsets.only(left: 36.w, right: 16.w), padding: EdgeInsets.only(left: 36.w, right: 16.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (messages[position].state == 3) if (messages[position].state == 3)
Container( Container(
@ -1139,14 +1142,10 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
// backgroundColor: Color(0xFF2A2A2A), backgroundColor: Colors.transparent,
// elevation: 0, elevation: 0,
contentPadding: EdgeInsets.only(
top: 8.h,
bottom: 5.h,
),
content: Container( content: Container(
width: 160.w, // width: 60.w,
height:50.h, height:50.h,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF2A2A2A), color: Color(0xFF2A2A2A),

11
lib/mine/personal_page.dart

@ -29,6 +29,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import '../retrofit/data/im_user.dart'; import '../retrofit/data/im_user.dart';
import '../view_widget/my_tab.dart'; import '../view_widget/my_tab.dart';
import '../view_widget/settlement_tips_dialog.dart';
class PersonalPage extends StatefulWidget { class PersonalPage extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -115,8 +116,11 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver,Sing
BaseData baseData = await apiService.follow(followId ?? ""); BaseData baseData = await apiService.follow(followId ?? "");
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
queryCommunity(null); queryCommunity(null);
SmartDialog.showToast(isFollow ? "关注成功" : "取关成功", SmartDialog.show(
alignment: Alignment.center); widget: SettlementTips(
() {},
text: isFollow ? "取关成功" : "关注成功"
));
setState(() {}); setState(() {});
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
@ -1260,7 +1264,8 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver,Sing
Expanded(child:GestureDetector( Expanded(child:GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
if (articles.isNotEmpty)
vipFollow(memberId, articles.first.followed ?? false);
}, },
child: Container( child: Container(
// padding: EdgeInsets.symmetric(vertical:12.h), // padding: EdgeInsets.symmetric(vertical:12.h),

Loading…
Cancel
Save