Browse Source

消息bug更改

ff_new
w-R 3 years ago
parent
commit
a9ae353e2f
  1. 6
      lib/home/home_page.dart
  2. 13
      lib/message/system_details.dart

6
lib/home/home_page.dart

@ -246,6 +246,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
} }
} }
///
queryMsgStats() async { queryMsgStats() async {
if (apiService == null) { if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance(); SharedPreferences value = await SharedPreferences.getInstance();
@ -365,12 +366,13 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
header: MyHeader(), header: MyHeader(),
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
onRefresh: () { onRefresh: () {
setState(() {}); setState(() {_onRefresh();
});
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
child: FutureBuilder( child: FutureBuilder(
future: _onRefresh(), future:queryHome(),
builder: (context, snapshot) { builder: (context, snapshot) {
return Column( return Column(
children: [ children: [

13
lib/message/system_details.dart

@ -496,13 +496,8 @@ class _SystemDetails extends State<SystemDetails> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// Image.asset(
// "assets/image/c_z.png",
// width: 44.w,
// height: 44.h,
// ),
MImage( MImage(
messageRelational["avatar"], messageRelational["avatar"] ?? "",
width: 44, width: 44,
height: 44, height: 44,
isCircle: true, isCircle: true,
@ -518,7 +513,7 @@ class _SystemDetails extends State<SystemDetails> {
Row( Row(
children: [ children: [
Text( Text(
messageRelational["nickname"], messageRelational["nickname"] ?? "",
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp, fontSize: 14.sp,
@ -562,7 +557,7 @@ class _SystemDetails extends State<SystemDetails> {
// ), // ),
// ), // ),
MImage( MImage(
messageRelational["nickname"], messageRelational["nickname"] ,
width: 38, width: 38,
height: 38, height: 38,
isCircle: true, isCircle: true,
@ -880,12 +875,14 @@ class _SystemDetails extends State<SystemDetails> {
} }
Widget followMessageItem(Message message) { Widget followMessageItem(Message message) {
var messageRelational = jsonDecode(message.relational); var messageRelational = jsonDecode(message.relational);
if(message.relational.startsWith("{"))
return Container( return Container(
child: child:
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
MImage( MImage(
messageRelational["avatar"], messageRelational["avatar"],
width: 44, width: 44,

Loading…
Cancel
Save