Просмотр исходного кода

Merge remote-tracking branch 'master/master'

# Conflicts:
#	i18n/en-US.json
#	i18n/ja-JP.json
#	i18n/ko-KR.json
#	i18n/vi-VN.json
#	i18n/zh-CN.json
#	i18n/zh-HK.json
#	lib/chat/ChatPage.dart
#	lib/generated/i18n.dart
master
jiahao 5 лет назад
Родитель
Сommit
97ed0610fc
16 измененных файлов: 1436 добавлений и 1426 удалений
  1. +12
    -9
      i18n/en-US.json
  2. +12
    -9
      i18n/ja-JP.json
  3. +11
    -8
      i18n/ko-KR.json
  4. +6
    -3
      i18n/vi-VN.json
  5. +1200
    -1197
      i18n/zh-CN.json
  6. +16
    -13
      i18n/zh-HK.json
  7. +74
    -99
      lib/chat/ChatPage.dart
  8. +3
    -3
      lib/chat/input_bar.dart
  9. +7
    -2
      lib/chat/util_keyboard.dart
  10. +30
    -30
      lib/generated/i18n.dart
  11. +2
    -2
      lib/home/ConversActionPage.dart
  12. +31
    -28
      lib/home/InfoList.dart
  13. +1
    -1
      lib/home/WhiteAndBlackList.dart
  14. +25
    -21
      lib/home/address_book.dart
  15. +5
    -0
      lib/home/create_group_view.dart
  16. +1
    -1
      lib/models/last_msg_description.dart

+ 12
- 9
i18n/en-US.json Просмотреть файл

@@ -1153,16 +1153,16 @@
"enter_num_qian": " number of exchanges (unit K) ",
"enter_num_qian1": " number of withdrawals (unit K) ",
"daily_translate_voucher": "翻译券",
"msg_notice":"通知消息",
"select_notice_people":"选择提醒的人",
"search_phone":"查找手机号",
"not_have_user":"用户不存在",
"not_add_Myself":"你不能添加自己",
"you_are_blaklisted":"对方已拉黑了你",
"confrim_recovery":"确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"msg_notice": "通知消息",
"select_notice_people": "选择提醒的人",
"search_phone": "查找手机号",
"not_have_user": "用户不存在",
"not_add_Myself": "你不能添加自己",
"you_are_blaklisted": "对方已拉黑了你",
"confrim_recovery": "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"send_to": "發送到",
"search_plach":"搜索位置",
"finding_place":"查找位置",
"search_plach": "搜索位置",
"finding_place": "查找位置",
"real_time_helper": "实时帮",
"translation_butler": "翻译管家",
"travel_butler": "出行管家",
@@ -1214,6 +1214,9 @@
"translation_scenes_2": "餐厅/酒店",
"translation_scenes_3": "KTV/酒吧",
"translation_scenes_4": "其他",
"file": "文件",
"max_file":"文件大于/s1M"
"translation_scenes_4": "其他",
"translation_input_limit": "还可以输入/s1字",
"translation_more_desc": "更多描述"


+ 12
- 9
i18n/ja-JP.json Просмотреть файл

@@ -1153,16 +1153,16 @@
"enter_num_qian": "交換数量(单位K)",
"enter_num_qian1": "引き出し数量(单位K)",
"daily_translate_voucher": "翻译券",
"msg_notice":"通知消息",
"select_notice_people":"选择提醒的人",
"search_phone":"查找手机号",
"not_have_user":"用户不存在",
"not_add_Myself":"你不能添加自己",
"you_are_blaklisted":"对方已拉黑了你",
"confrim_recovery":"确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"msg_notice": "通知消息",
"select_notice_people": "选择提醒的人",
"search_phone": "查找手机号",
"not_have_user": "用户不存在",
"not_add_Myself": "你不能添加自己",
"you_are_blaklisted": "对方已拉黑了你",
"confrim_recovery": "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"send_to": "發送到",
"search_plach":"搜索位置",
"finding_place":"查找位置",
"search_plach": "搜索位置",
"finding_place": "查找位置",
"real_time_helper": "实时帮",
"translation_butler": "翻译管家",
"travel_butler": "出行管家",
@@ -1214,6 +1214,9 @@
"translation_scenes_2": "餐厅/酒店",
"translation_scenes_3": "KTV/酒吧",
"translation_scenes_4": "其他",
"file": "文件",
"max_file":"文件大于/s1M"
"translation_scenes_4": "其他",
"translation_input_limit": "还可以输入/s1字",
"translation_more_desc": "更多描述"
}

+ 11
- 8
i18n/ko-KR.json Просмотреть файл

@@ -1153,15 +1153,15 @@
"enter_num_qian": "환전 금액(단위 K)",
"enter_num_qian1": "인출 금액(단위K)",
"daily_translate_voucher": "翻译券",
"msg_notice":"通知消息",
"select_notice_people":"选择提醒的人",
"search_phone":"查找手机号",
"not_have_user":"用户不存在",
"you_are_blaklisted":"对方已拉黑了你",
"confrim_recovery":"确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"msg_notice": "通知消息",
"select_notice_people": "选择提醒的人",
"search_phone": "查找手机号",
"not_have_user": "用户不存在",
"you_are_blaklisted": "对方已拉黑了你",
"confrim_recovery": "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"send_to": "發送到",
"search_plach":"搜索位置",
"finding_place":"查找位置",
"search_plach": "搜索位置",
"finding_place": "查找位置",
"real_time_helper": "实时帮",
"translation_butler": "翻译管家",
"travel_butler": "出行管家",
@@ -1213,6 +1213,9 @@
"translation_scenes_2": "餐厅/酒店",
"translation_scenes_3": "KTV/酒吧",
"translation_scenes_4": "其他",
"file": "文件",
"max_file":"文件大于/s1M"
"translation_scenes_4": "其他",
"translation_input_limit": "还可以输入/s1字",
"translation_more_desc": "更多描述"
}

+ 6
- 3
i18n/vi-VN.json Просмотреть файл

@@ -278,7 +278,7 @@
"select_program": "Vui lòng chọn quốc tịch",
"healthy_exercise": "TDTT",
"night_party": "Tiệc đêm",
"gourmet_party": "Sành ăn",
"gourmet_party": "Tham ăn",
"watch_movie": "Xem phim",
"play_games": "Chơi game",
"travel_together": "Du lịch",
@@ -323,7 +323,7 @@
"added_like": "Yêu thích",
"canceled_like": "Đã hủy yêu thích",
"blacklist": "Danh sách đen",
"blacklist_choose": "Bạn sẽ không thể thấy đối phương và hoạt động gần đây của họ, có chắc là bạn muốn thế không?",
"blacklist_choose": "Các anh em sẽ không thể thấy được đối phương và hoạt động gần đây của đối phương, có chắc là bạn muốn thế không?",
"blacklisted": "Đã thêm vào danh sách đen",
"reject_message": "Bạn đã thêm đối Phương vào danh sách đen và từ chối nhận tin nhắn",
"remove_blacklist": "Xóa khỏi danh sách đen",
@@ -410,7 +410,7 @@
"enter_account": "Nhập số tài khoản mạng xã hội của bạn",
"for_example": "Tài khoản Wechat abc",
"sent_she": "Gửi cho em ấy",
"chat": "Nối mic",
"chat": "Liên mic",
"cantt_voice": "Đối phương đã tắt chức năng trò chuyện trực tuyến",
"authentication_voice": "Sau khi tính xác thực của bạn được chứng nhận, bạn mới có thể trò chuyện trực tuyến",
"requesting_voice": "Đang yêu cầu kết nối trò chuyện trực tuyến",
@@ -1214,6 +1214,9 @@
"translation_scenes_2": "餐厅/酒店",
"translation_scenes_3": "KTV/酒吧",
"translation_scenes_4": "其他",
"file": "文件",
"max_file":"文件大于/s1M"
"translation_scenes_4": "其他",
"translation_input_limit": "还可以输入/s1字",
"translation_more_desc": "更多描述"
}

+ 1200
- 1197
i18n/zh-CN.json
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 16
- 13
i18n/zh-HK.json Просмотреть файл

@@ -1146,23 +1146,23 @@
"exchange_fail": "您的提款申請失敗,已退回",
"hibok_exchange": "通過Hibox收入兌換/s1H幣",
"bind_code_success": "成功綁定代理優惠碼",
"translate_money":"您消耗了/s1H幣進行人工翻譯",
"translate_money": "您消耗了/s1H幣進行人工翻譯",
"system_back": "系統取消退回",
"you_give": "你打賞了對方",
"you_get":"對方打賞了你",
"enter_num_qian":"兑换数目(单位K)",
"enter_num_qian1":"提现数目(单位K)",
"you_get": "對方打賞了你",
"enter_num_qian": "兑换数目(单位K)",
"enter_num_qian1": "提现数目(单位K)",
"daily_translate_voucher": "翻譯券",
"msg_notice":"通知消息",
"select_notice_people":"選擇提醒的人",
"search_phone":"查找手機號",
"not_have_user":"用戶不存在",
"not_add_Myself":"你不能添加自己",
"you_are_blaklisted":"對方已拉黑了你",
"confrim_recovery":"確定恢復已被焚毀的照片嗎?\n(已經看過的用戶可以再看一次)",
"msg_notice": "通知消息",
"select_notice_people": "選擇提醒的人",
"search_phone": "查找手機號",
"not_have_user": "用戶不存在",
"not_add_Myself": "你不能添加自己",
"you_are_blaklisted": "對方已拉黑了你",
"confrim_recovery": "確定恢復已被焚毀的照片嗎?\n(已經看過的用戶可以再看一次)",
"send_to": "發送到",
"search_plach":"搜索位置",
"finding_place":"查找位置",
"search_plach": "搜索位置",
"finding_place": "查找位置",
"real_time_helper": "實時幫",
"translation_butler": "翻譯管家",
"travel_butler": "出行管家",
@@ -1214,6 +1214,9 @@
"translation_scenes_2": "餐厅/酒店",
"translation_scenes_3": "KTV/酒吧",
"translation_scenes_4": "其他",
"file": "文件",
"max_file":"文件大於/s1M"
"translation_scenes_4": "其他",
"translation_input_limit": "还可以输入/s1字",
"translation_more_desc": "更多描述"


+ 74
- 99
lib/chat/ChatPage.dart Просмотреть файл

@@ -7,6 +7,7 @@ import 'package:chat/data/UserData.dart';
import 'package:chat/data/chat_data_mgr.dart';
import 'package:chat/data/constants.dart';
import 'package:chat/generated/i18n.dart';
import 'package:chat/home/add_friend.dart';
import 'package:chat/models/ChatMsg.dart';
import 'package:chat/models/UserInfo.dart';
import 'package:chat/models/keyboard_provider.dart';
@@ -46,7 +47,12 @@ class ChatPage extends StatefulWidget {
final dynamic enterContent;
final bool isTranslateButler;
ChatPage({Key key, this.friendId, this.enterType = 0, this.enterContent,this.isTranslateButler=false})
ChatPage(
{Key key,
this.friendId,
this.enterType = 0,
this.enterContent,
this.isTranslateButler = false})
: super(key: key);
_ChatPageState createState() => _ChatPageState();
@@ -109,7 +115,7 @@ class _ChatPageState extends State<ChatPage> {
print('选择的文件 ${file.path} 大小 $fileSize');
if (fileSize > 33 * 1024 * 1024) {
showToast('文件大于33M');
showToast(I18n.of(context).max_file.replaceFirst('/s1', 33.toString()));
return;
}
@@ -262,62 +268,17 @@ class _ChatPageState extends State<ChatPage> {
AppNavigator.pushInformUserPage(
context, friendInfo.sex == 1, friendInfo.userId);
} else if (index == 1) {
nickNameController.text = Provider.of<RefNameProvider>(context)
.getRefName(friendInfo.userId, friendInfo.nickName);
var confirm = CustomUI.buildConfirmBotton(
I18n.of(context).determine, () async {
nickNameController.text = nickNameController.text.trim();
if (nickNameController.text == null ||
nickNameController.text.length > 25) {
showToast(I18n.of(context).only1_8);
return;
}
Provider.of<RefNameProvider>(context).changeRefName(
friendInfo.userId, nickNameController.text, () {
Navigator.of(context).pop();
});
});
var tip = Column(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20),
child: Text(
I18n.of(context).setRemark,
textScaleFactor: 1.0,
style: TextStyle(
color: Constants.BlackTextColor, fontSize: 16),
),
),
Container(
margin: EdgeInsets.only(top: 23, bottom: 25),
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: BorderRadius.all(Radius.circular(8))),
child: TextField(
keyboardAppearance: Brightness.light,
controller: nickNameController,
textAlign: TextAlign.center,
textInputAction: TextInputAction.search,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14),
decoration: InputDecoration(
hintText: friendInfo.nickName,
hintStyle: TextStyle(fontSize: 12),
filled: true,
contentPadding: EdgeInsets.only(top: 10, bottom: 10),
fillColor: Colors.transparent,
border: InputBorder.none,
),
maxLines: 1,
inputFormatters: [LengthLimitingTextInputFormatter(15)],
),
)
],
Navigator.of(context).push(
new MaterialPageRoute(
builder: (context) {
return AddFriendPage(
userId: friendInfo.userId,
pageType: SendMessagePageType.Remark,
originalName: Provider.of<RefNameProvider>(context)
.getRefName(friendInfo.userId, friendInfo.nickName));
},
),
);
var content = CustomUI.buildConfirmContent(tip, confirm);
CustomUI.buildTip(context, '', content);
}
},
itemBuilder: (BuildContext context) {
@@ -388,9 +349,15 @@ class _ChatPageState extends State<ChatPage> {
child: Column(
children: <Widget>[
NetStateWidget(),
widget.isTranslateButler?_buildTranslationButler():Container(),
widget.isTranslateButler? _buildServiceCard(true,(){}):Container(),
widget.isTranslateButler? _buildServiceCard(false,(){}):Container(),
widget.isTranslateButler
? _buildTranslationButler()
: Container(),
widget.isTranslateButler
? _buildServiceCard(true, () {})
: Container(),
widget.isTranslateButler
? _buildServiceCard(false, () {})
: Container(),
Expanded(child: _buildMessageList()),
InputBar(sendMsg: sendMsg),
],
@@ -480,7 +447,7 @@ class _ChatPageState extends State<ChatPage> {
},
countDownTime: 60,
align: Alignment.centerRight,
onPress: (){},
onPress: () {},
),
// alignment: Alignment(1,0),
)),
@@ -489,7 +456,6 @@ class _ChatPageState extends State<ChatPage> {
);
}
Widget _buildServiceCard(bool isStart, Function callBack) {
return Container(
margin: EdgeInsets.all(10),
@@ -500,45 +466,54 @@ class _ChatPageState extends State<ChatPage> {
borderRadius: BorderRadius.circular(10),
// side: BorderSide(color: Colors.green,width: 25),
),
child: Padding(padding: EdgeInsets.only(left: 10,right: 10,top: 15,bottom: 15),child: Row(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
isStart?I18n.of(context).translation_butler_start_service:I18n.of(context).translation_butler_service_end,
textScaleFactor: 1.0,
style: TextStyle(
color: AppColors.NewAppbarTextColor, fontSize: 14),
),
SizedBox(height: 5,),
Text(
isStart?I18n.of(context).translation_butler_start_tips:I18n.of(context).translation_butler_evaluation_tips,
textScaleFactor: 1.0,
style: TextStyle(
color:Color(0xFF797979), fontSize: 11),
)
],
),
isStart?Container():Expanded(child: Container(
margin: EdgeInsets.only(left: 15 ),
height: 35,
child: RaisedButton(
color: Color(0xff3875E9),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
child: Text(
I18n.of(context).translation_butler_evaluation ,
child: Padding(
padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 15),
child: Row(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
isStart
? I18n.of(context).translation_butler_start_service
: I18n.of(context).translation_butler_service_end,
textScaleFactor: 1.0,
style: TextStyle(color: Colors.white, fontSize: 15),
style: TextStyle(
color: AppColors.NewAppbarTextColor, fontSize: 15),
),
onPressed:(){
CustomUI.buildTranslationEvaluationDialog(context);
} ),
)),
],
),),
Text(
isStart
? I18n.of(context).translation_butler_start_tips
: I18n.of(context).translation_butler_evaluation_tips,
textScaleFactor: 1.0,
style: TextStyle(
color: AppColors.NewAppbarTextColor, fontSize: 13),
)
],
),
isStart
? Container()
: Expanded(
child: Container(
margin: EdgeInsets.only(left: 15),
height: 30,
child: RaisedButton(
color: Color(0xff3875E9),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(10))),
child: Text(
I18n.of(context).translation_butler_evaluation,
textScaleFactor: 1.0,
style: TextStyle(color: Colors.white, fontSize: 19),
),
onPressed: () {
CustomUI.buildTranslationEvaluationDialog(context);
}),
)),
],
),
),
),
);
}


+ 3
- 3
lib/chat/input_bar.dart Просмотреть файл

@@ -209,7 +209,7 @@ class InputBarState extends State<InputBar>
break;
case ChatType.FileChatType:
desc = '[文件]';
desc = '[${I18n.of(context).file}]';
break;
default:
@@ -682,8 +682,8 @@ class InputBarState extends State<InputBar>
}
void _openPhotoView() async {
Provider.of<KeyboardIndexProvider>(context, listen: false)
.changeSelectIndex(4);
// Provider.of<KeyboardIndexProvider>(context, listen: false)
// .changeSelectIndex(4);
var photos = await PhotoPicker.pickAsset(
context: context,


+ 7
- 2
lib/chat/util_keyboard.dart Просмотреть файл

@@ -79,6 +79,10 @@ class _UtilKeyboardState extends State<UtilKeyboard> {
offstage: !isShowRedPacket,
child: _buildOtherSelect(
R.assetsImagesChatItem5, I18n.of(context).red_money, () {
int friendId = Provider.of<int>(context);
if (BlacklistMgr.isBlack(friendId)) {
return;
}
AppNavigator.pushCoinBagPage(context);
})));
@@ -88,7 +92,8 @@ class _UtilKeyboardState extends State<UtilKeyboard> {
}));
}
iconList.add(_buildOtherSelect(R.assetsImagesChatItem7, '文件', () async {
iconList.add(_buildOtherSelect(
R.assetsImagesChatItem7, I18n.of(context).file, () async {
_sendFile(context);
}));
@@ -303,7 +308,7 @@ class _UtilKeyboardState extends State<UtilKeyboard> {
print('选择的文件 ${file.path} 大小 $fileSize');
if (fileSize > 33 * 1024 * 1024) {
showToast('文件大于33M');
showToast(I18n.of(context).max_file.replaceFirst('/s1', 33.toString()));
return;
}


+ 30
- 30
lib/generated/i18n.dart Просмотреть файл

@@ -2463,10 +2463,10 @@ class I18n implements WidgetsLocalizations {
String get translation_scenes_3 => "KTV/酒吧";
/// "其他"
String get translation_scenes_4 => "其他";
/// "还可以输入/s1字"
String get translation_input_limit => "还可以输入/s1字";
/// "更多描述"
String get translation_more_desc => "更多描述";
/// "文件"
String get file => "文件";
/// "文件大于/s1M"
String get max_file => "文件大于/s1M";
}

class _I18n_en_US extends I18n {
@@ -3316,9 +3316,9 @@ class _I18n_vi_VN extends I18n {
/// "Tiệc đêm"
@override
String get night_party => "Tiệc đêm";
/// "Sành ăn"
/// "Tham ăn"
@override
String get gourmet_party => "Sành ăn";
String get gourmet_party => "Tham ăn";
/// "Xem phim"
@override
String get watch_movie => "Xem phim";
@@ -3451,9 +3451,9 @@ class _I18n_vi_VN extends I18n {
/// "Danh sách đen"
@override
String get blacklist => "Danh sách đen";
/// "Bạn sẽ không thể thấy đối phương và hoạt động gần đây của họ, có chắc là bạn muốn thế không?"
/// "Các anh em sẽ không thể thấy được đối phương và hoạt động gần đây của đối phương, có chắc là bạn muốn thế không?"
@override
String get blacklist_choose => "Bạn sẽ không thể thấy đối phương và hoạt động gần đây của họ, có chắc là bạn muốn thế không?";
String get blacklist_choose => "Các anh em sẽ không thể thấy được đối phương và hoạt động gần đây của đối phương, có chắc là bạn muốn thế không?";
/// "Đã thêm vào danh sách đen"
@override
String get blacklisted => "Đã thêm vào danh sách đen";
@@ -3712,9 +3712,9 @@ class _I18n_vi_VN extends I18n {
/// "Gửi cho em ấy"
@override
String get sent_she => "Gửi cho em ấy";
/// "Nối mic"
/// "Liên mic"
@override
String get chat => "Nối mic";
String get chat => "Liên mic";
/// "Đối phương đã tắt chức năng trò chuyện trực tuyến"
@override
String get cantt_voice => "Đối phương đã tắt chức năng trò chuyện trực tuyến";
@@ -6124,12 +6124,12 @@ class _I18n_vi_VN extends I18n {
/// "其他"
@override
String get translation_scenes_4 => "其他";
/// "还可以输入/s1字"
/// "文件"
@override
String get translation_input_limit => "还可以输入/s1字";
/// "更多描述"
String get file => "文件";
/// "文件大于/s1M"
@override
String get translation_more_desc => "更多描述";
String get max_file => "文件大于/s1M";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -9783,12 +9783,12 @@ class _I18n_zh_HK extends I18n {
/// "其他"
@override
String get translation_scenes_4 => "其他";
/// "还可以输入/s1字"
/// "文件"
@override
String get translation_input_limit => "还可以输入/s1字";
/// "更多描述"
String get file => "文件";
/// "文件大於/s1M"
@override
String get translation_more_desc => "更多描述";
String get max_file => "文件大於/s1M";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -13442,12 +13442,12 @@ class _I18n_zh_CN extends _I18n_zh_HK {
/// "其他"
@override
String get translation_scenes_4 => "其他";
/// "还可以输入/s1字"
/// "文件"
@override
String get translation_input_limit => "还可以输入/s1字";
/// "更多描述"
String get file => "文件";
/// "文件大于/s1M"
@override
String get translation_more_desc => "更多描述";
String get max_file => "文件大于/s1M";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -17098,12 +17098,12 @@ class _I18n_ko_KR extends I18n {
/// "其他"
@override
String get translation_scenes_4 => "其他";
/// "还可以输入/s1字"
/// "文件"
@override
String get translation_input_limit => "还可以输入/s1字";
/// "更多描述"
String get file => "文件";
/// "文件大于/s1M"
@override
String get translation_more_desc => "更多描述";
String get max_file => "文件大于/s1M";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -20757,12 +20757,12 @@ class _I18n_ja_JP extends I18n {
/// "其他"
@override
String get translation_scenes_4 => "其他";
/// "还可以输入/s1字"
/// "文件"
@override
String get translation_input_limit => "还可以输入/s1字";
/// "更多描述"
String get file => "文件";
/// "文件大于/s1M"
@override
String get translation_more_desc => "更多描述";
String get max_file => "文件大于/s1M";

@override
TextDirection get textDirection => TextDirection.ltr;


+ 2
- 2
lib/home/ConversActionPage.dart Просмотреть файл

@@ -405,7 +405,7 @@ class _ConversActionPageState extends State<ConversActionPage>
avatar: 'assets/images/ic_tx_news.png',
title: I18n.of(context).wallet_reminder,
desc: RichTitle.normalTitle(
systemInfo['walletList'], context, InfoType.Money),
systemInfo['walletList'], context, InfoType.IncomeMoney),
updateAt: systemInfo['walletList'] == null
? ""
: WebData().getLoginTime(
@@ -419,7 +419,7 @@ class _ConversActionPageState extends State<ConversActionPage>
builder: (context) {
return InfoListPage(
title: I18n.of(context).wallet_reminder,
type: InfoType.Money,
type: InfoType.IncomeMoney,
);
},
),


+ 31
- 28
lib/home/InfoList.dart Просмотреть файл

@@ -24,7 +24,6 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'ProgramDetail.dart';
class _ConversationItem extends StatelessWidget {
const _ConversationItem(
{Key key,
@@ -432,8 +431,8 @@ class _InfoListPageState extends State<InfoListPage>
case InfoType.Radio: //获取电台消息
getData('message/center/cast', callback);
break;
case InfoType.Money: //获取钱包通知
getData('message/wallet/message', callback);
case InfoType.IncomeMoney: //获取钱包通知
getData('wallet/balance/detail', callback);
break;
default:
}
@@ -446,10 +445,10 @@ class _InfoListPageState extends State<InfoListPage>
if (widget.type == InfoType.System) {
data['type'] = UserData().basicInfo.sex;
}
data['sign'] = TokenMgr().getSign(data);
if (widget.type == InfoType.Money) {
data['type'] = 1;
if (widget.type == InfoType.IncomeMoney) {
data['type'] = 2;
}
data['sign'] = TokenMgr().getSign(data);
data["page"] = _page;
data['rows'] = rows;
Response res = await HttpUtil()
@@ -481,11 +480,12 @@ class _InfoListPageState extends State<InfoListPage>
//钱包通知
Widget _buildMoneyInfo(data) {
String imgUrl = data['HeadImg'] == null || data['HeadImg'] == ''
? 'assets/images/chat/icon4.png'
String imgUrl = data['HeadImg'] == null ||
data['HeadImg'] == '' ||
data['ChangeUserId'] == 0
? UserData().basicInfo.headimgurl
: data['HeadImg'];
bool showIndex = data['ChangeUserId'] != 0;
return _ConversationItem(
conversation: Conversation(
avatar: imgUrl,
@@ -494,27 +494,30 @@ class _InfoListPageState extends State<InfoListPage>
updateAt: '',
),
bgColor: Constants.MoneyGradient,
showRight: data['DetailType'] == 10,
title: RichTitle.getRichTitleWidget(data, context, InfoType.Money),
rightButton: Text(I18n.of(context).alreay_back,
style: TextStyle(
fontSize: 12,
showRight: false,
// isInCome: widget.type == 2,
// money: isAdd(data['DetailType']) ? data['Value'] : -data['Value'],
title: RichTitle.getRichTitleWidget(data, context,
widget.type == 1 ? InfoType.MyMoney : InfoType.IncomeMoney,
titleStyle: TextStyle(fontSize: 12, color: const Color(0XFF7F7F7F)),
nameStyle: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 13,
color: Constants.BlackTextColor)),
callback: () {
if (showIndex) {
Navigator.of(context).push(
new MaterialPageRoute(
builder: (context) {
return ProfilePage(
userId: data['UserId'] == UserData().basicInfo.userId
? data['ChangeUserId']
: data['UserId'],
);
},
),
);
}
// if (data['ChangeUserId'] != 0) {
// Navigator.of(context).push(
// new MaterialPageRoute(
// builder: (context) {
// return ProfilePage(
// userId: data['UserId'] == UserData().basicInfo.userId
// ? data['ChangeUserId']
// : data['UserId'],
// );
// },
// ),
// );
// }
},
);
}
@@ -753,7 +756,7 @@ class _InfoListPageState extends State<InfoListPage>
case InfoType.Radio:
result = _buildRadioInfo(userInfo);
break;
case InfoType.Money:
case InfoType.IncomeMoney:
result = _buildMoneyInfo(userInfo);
break;
default:


+ 1
- 1
lib/home/WhiteAndBlackList.dart Просмотреть файл

@@ -164,7 +164,7 @@ class _WhiteAndBlackPageState extends State<WhiteAndBlackPage> {
Expanded(child: Container()),
InkWell(
onTap: () async {
HttpUtil().cancleBlackUser(userInfo.userId, () {
HttpUtil().cancleBlackUser(userInfo['FollowUserId'], () {
for (int i = 0; i < list.length; i++) {
if (list[i]['FollowUserId'] == userInfo['FollowUserId']) {
setState(() {


+ 25
- 21
lib/home/address_book.dart Просмотреть файл

@@ -189,6 +189,7 @@ class _ContactsPageState extends State<ContactsPage> {
TextEditingController _txtCtrl = new TextEditingController();
FocusNode editFocus = FocusNode();
bool _hasdeleteIcon = false;
bool isLoadingFinish = false;
List<FriendModel> searchList = [];
@@ -222,6 +223,7 @@ class _ContactsPageState extends State<ContactsPage> {
Response res = await HttpUtil().post('maillist/user/get', data: data);
Map resData = res.data;
isLoadingFinish = true;
print(resData['data']);
if (resData['code'] == 0 && resData['data'] != null) {
resData['data'].forEach((f) {
@@ -247,28 +249,30 @@ class _ContactsPageState extends State<ContactsPage> {
if (!_hasdeleteIcon) {
friendList.sort((a, b) => a.nameTag.compareTo(b.nameTag));
_body.add(ListView.builder(
controller: _scrollController,
itemBuilder: (BuildContext context, int index) {
int _contactIndex = index;
bool _isGroupTitle = true;
FriendModel _contact = friendList[_contactIndex];
_body.add((friendList == null || friendList.length == 0)
? CustomUI.buildNoData(context)
: ListView.builder(
controller: _scrollController,
itemBuilder: (BuildContext context, int index) {
int _contactIndex = index;
bool _isGroupTitle = true;
FriendModel _contact = friendList[_contactIndex];
if (_contactIndex >= 1 &&
_contact.nameTag == friendList[_contactIndex - 1].nameTag) {
_isGroupTitle = false;
}
if (_contactIndex >= 1 &&
_contact.nameTag == friendList[_contactIndex - 1].nameTag) {
_isGroupTitle = false;
}
return _ContactItem(
userId: _contact.friendId,
avatar: _contact.avatar,
title: _contact.name,
state: _contact.state,
isShowDivder: _isGroupTitle,
groupTitle: _isGroupTitle ? _contact.nameTag : null);
},
itemCount: friendList.length,
));
return _ContactItem(
userId: _contact.friendId,
avatar: _contact.avatar,
title: _contact.name,
state: _contact.state,
isShowDivder: _isGroupTitle,
groupTitle: _isGroupTitle ? _contact.nameTag : null);
},
itemCount: friendList.length,
));
} else {
_body.add(ListView.builder(
controller: _scrollController,
@@ -329,7 +333,7 @@ class _ContactsPageState extends State<ContactsPage> {
color: const Color(0xFFEEEEEE),
borderRadius: BorderRadius.all(Radius.circular(8))),
child: TextField(
keyboardAppearance: Brightness.light,
keyboardAppearance: Brightness.light,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.search,
controller: _txtCtrl,


+ 5
- 0
lib/home/create_group_view.dart Просмотреть файл

@@ -22,6 +22,11 @@ Widget _createAvatar(avatar) {
borderRadius: BorderRadius.circular(6),
child: CachedNetworkImage(
imageUrl: avatar,
placeholder: (context, url) => Image.asset(
Constants.DefaultHeadImgUrl,
width: Constants.ContactAvatarSize,
height: Constants.ContactAvatarSize,
),
width: Constants.ContactAvatarSize,
height: Constants.ContactAvatarSize,
));


+ 1
- 1
lib/models/last_msg_description.dart Просмотреть файл

@@ -151,7 +151,7 @@ class _LastMsgDescriptionState extends State<LastMsgDescription> {
break;
case ChatType.FileChatType:
desc = '[文件]';
desc = '[${I18n.of(context).file}]';
break;
default:
}


Загрузка…
Отмена
Сохранить