diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json index e789546..b88df40 100644 --- a/i18n/vi-VN.json +++ b/i18n/vi-VN.json @@ -1152,77 +1152,77 @@ "you_get": "Đối phương thưởng cho bạn", "enter_num_qian": "Số lượng hối đổi (đơn vị K)", "enter_num_qian1": "Số lượng tiền rút (đơn vị K)", - "daily_translate_voucher": "翻译券", - "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": "查找位置", - "real_time_helper": "实时帮", - "translation_butler": "翻译管家", - "travel_butler": "出行管家", - "translation_butler_tips": "您的实时贴身翻译,随时随地帮您解决语言不通", - "choose_language": "请选择要翻译的语言", - "translation_butler_rules": "呼叫管家需要预付H币,管家服务时长为5分钟", - "translation_butler_scenes": "您当所在场景", - "translation_butler_scenes_tips": "根据大数据显示,选择了场景并描述问题的用户得到了更有效的帮助哦!", - "translation_butler_call": "呼叫管家", - "travel_my_location": "我的位置", - "travel_go_where": "你要去哪儿", - "travel_tips": "当前定位非实时监测,每次需点击“距离查询”按钮查询", - "travel_check_distance": "距离查询", - "travel_check_distance_result": "根据定位查询,您的当前距离目标地点相距:", - "translation_butler_tips2": "当前排队人数过多,感谢您的耐心等待", - "translation_butler_tips3": "正在为您呼叫管家", - "translation_butler_wait_people": "等待人数", - "translation_butler_wait_people_unit": "位", - "translation_butler_wait_time": "预计还需等待", - "translation_butler_already_wait": "已等待", - "translation_butler_cancel": "取消呼叫", - "translation_butler_wait_service": "等待服务", - "translation_butler_dialog_title": "实时帮-翻译管家", - "translation_butler_dialog_order": "/s1通过系统下单", - "translation_butler_dialog_start_service": "开始服务", - "translation_butler_dialog_start_chat": "开始聊天", - "translation_butler_coin_time": "/s1H币//s2分钟", - "translation_butler_end_service": "结束服务", - "translation_butler_start_service": "服务开始", - "translation_butler_service_end": "服务结束", - "translation_butler_evaluation": "评价", - "translation_butler_start_tips": "翻译服务已开始,愿本次服务体验愉快", - "translation_butler_evaluation_tips": "翻译服务已结束,体验愉快就给个评价吧", - "translation_butler_dialog_tips": "你对本次服务满意吗?", - "translation_butler_dialog_yes": "满意", - "translation_butler_dialog_no": "不满意", - "translation_butler_dialog_submit": "提交评价", - "translation_pos_1": "服务耐心", - "translation_pos_2": "快速准时", - "translation_pos_3": "礼貌热情", - "translation_pos_4": "沟通顺畅", - "translation_pos_5": "大神翻译", - "translation_neg1": "骚扰威胁", - "translation_neg2": "沟通障碍", - "translation_neg3": "响应缓慢", - "translation_neg4": "态度不好", - "translation_neg5": "翻译不行", - "translation_scenes_1": "机场/车站", - "translation_scenes_2": "餐厅/酒店", - "translation_scenes_3": "KTV/酒吧", - "translation_scenes_4": "其他", - "file": "文件", - "max_file": "文件大于/s1M", - "translation_input_limit": "还可以输入/s1字", - "translation_more_desc": "更多描述", - "feedback_assistant": "反馈小助手", - "feedback_tips":"有什么问题都可以反馈给我哦", - "man_retranslate":"人工重译", - "robot_retranslate":"机器重译", - "see_original":"查看原文", - "forward":"转发", - "copy_download_url":"复制下载地址" + "daily_translate_voucher": "Phiếu phiên dịch", + "msg_notice": "Tin nhắn thông báo ", + "select_notice_people": "Chọn người nhắc nhở", + "search_phone": " Tìm số điện thoại", + "not_have_user": " Người dùng không tồn tại ", + "not_add_Myself": "Bạn không thể thêm chính mình", + "you_are_blaklisted": " Đối phương đã đưa bạn vào danh sách đen", + "confrim_recovery": " Có chắc là bạn muốn phục hồi ảnh đã tiêu hủy không?\n (người dùng đã xem có thể xem lại lần nữa", + "send_to": " Gửi tới ", + "search_place": "Rà soát địa điểm", + "finding_place": " Tìm địa điểm", + "real_time_helper": "Hỗ trợ nhanh", + "translation_butler": "Trợ lý phiên dịch", + "travel_butler": " Trợ lý chỉ đường", + "translation_butler_tips": "Trợ lý dịch thuật giúp bạn giải quyết trở ngại ngôn ngữ", + "choose_language": " Vui lòng chọn một ngôn ngữ để dịch ", + "translation_butler_rules": "Gọi trợ lý cần trả H-coin, thời gian sử dụng là 5 phút", + "translation_butler_scenes": "Tình cảnh hiện nay của bạn", + "translation_butler_scenes_tips": "Dữ liệu cho thấy, những người dùng đã xác nhận tình cảnh và mô tả rõ vấn đề sẽ được hỗ trợ hiệu quả hơn.", + "translation_butler_call": "Gọi trợ lý", + "travel_my_location": " Vị trí của tôi", + "travel_go_where": " Bạn muốn đi đâu ", + "travel_tips": "Định vị không đúng, bạn nên bấm \"kiểm tra khoảng cách\"", + "travel_check_distance": "Kiểm tra khoảng cách", + "travel_check_distance_result": "Theo vị trí định vị, hiện nay bạn cách mục tiêu có:", + "translation_butler_tips2": "Hiện số người đang xếp hàng khá đông, cảm ơn bạn đã kiên nhẫn chờ đợi", + "translation_butler_tips3": "Đang gọi trợ lý", + "translation_butler_wait_people": "Số người đang xếp hàng", + "translation_butler_wait_people_unit": "Người", + "translation_butler_wait_time": "Bạn còn phải đợi", + "translation_butler_already_wait": " Đã Chờ", + "translation_butler_cancel": "Hủy dịch vụ", + "translation_butler_wait_service": "Chờ dịch vụ", + "translation_butler_dialog_title": "Hỗ trợ nhanh- trợ lý phiên dịch", + "translation_butler_dialog_order": "Bạn đã đặt dịch vụ qua hệ thống", + "translation_butler_dialog_start_service": "Dịch vụ bắt đầu", + "translation_butler_dialog_start_chat": " Bắt đầu trò chuyện ", + "translation_butler_coin_time": "/s1H coin //s2 phút ", + "translation_butler_end_service": "Dịch vụ kết thúc", + "translation_butler_start_service": "Bắt đầu dịch vụ", + "translation_butler_service_end": "Kết thúc dịch vụ", + "translation_butler_evaluation": " Đánh giá", + "translation_butler_start_tips": "Dịch vụ phiên dịch đã bắt đầu, hy vọng có thể khiến bạn hài lòng", + "translation_butler_evaluation_tips": "Dịch vụ phiên dịch đã kết thúc, hãy cho chúng tôi biết nếu bạn cảm thấy hài lòng.", + "translation_butler_dialog_tips": " Bạn có hài lòng với dịch vụ này?", + "translation_butler_dialog_yes": " Hài lòng ", + "translation_butler_dialog_no": " Không hài lòng ", + "translation_butler_dialog_submit": " Gửi đánh giá", + "translation_pos_1": "Kiên nhẫn", + "translation_pos_2": " Nhanh chóng kịp thời ", + "translation_pos_3": " Lịch sự nhiệt tình ", + "translation_pos_4": "Giao tiếp trôi chảy", + "translation_pos_5": "Dịch quá đỉnh", + "translation_neg1": " Đe dọa quấy rối ", + "translation_neg2": "Giao tiếp khó khăn", + "translation_neg3": "Phản hồi chậm", + "translation_neg4": " Thái độ không tốt ", + "translation_neg5": "Phiên dịch không tốt", + "translation_scenes_1": "Sân bay/ bến xe", + "translation_scenes_2": " Nhà hàng / khách sạn ", + "translation_scenes_3": " KTV/ Bar ", + "translation_scenes_4": " Khác ", + "file": "file", + "max_file": "File lớn hơn /s1M", + "translation_input_limit": "Bạn còn có thể nhập /s1 ký tự", + "translation_more_desc": "Mô tả thêm ", + "feedback_assistant": "Trợ giúp phản hồi", + "feedback_tips": "Nếu gặp phải vấn đề bạn có thể phản hồi với chúng tôi!", + "man_retranslate": "人工重译", + "robot_retranslate": "机器重译", + "see_original": "查看原文", + "forward": "转发", + "copy_download_url": "复制下载地址" } \ No newline at end of file diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index 5546728..b2cd5b5 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -5956,210 +5956,207 @@ class _I18n_vi_VN extends I18n { /// "Số lượng tiền rút (đơn vị K)" @override String get enter_num_qian1 => "Số lượng tiền rút (đơn vị K)"; - /// "翻译券" + /// "Phiếu phiên dịch" @override - String get daily_translate_voucher => "翻译券"; - /// "通知消息" + String get daily_translate_voucher => "Phiếu phiên dịch"; + /// "Tin nhắn thông báo " @override - String get msg_notice => "通知消息"; - /// "选择提醒的人" + String get msg_notice => "Tin nhắn thông báo "; + /// "Chọn người nhắc nhở" @override - String get select_notice_people => "选择提醒的人"; - /// "查找手机号" + String get select_notice_people => "Chọn người nhắc nhở"; + /// " Tìm số điện thoại" @override - String get search_phone => "查找手机号"; - /// "用户不存在" + String get search_phone => " Tìm số điện thoại"; + /// " Người dùng không tồn tại " @override - String get not_have_user => "用户不存在"; - /// "你不能添加自己" + String get not_have_user => " Người dùng không tồn tại "; + /// "Bạn không thể thêm chính mình" @override - String get not_add_Myself => "你不能添加自己"; - /// "对方已拉黑了你" + String get not_add_Myself => "Bạn không thể thêm chính mình"; + /// " Đối phương đã đưa bạn vào danh sách đen" @override - String get you_are_blaklisted => "对方已拉黑了你"; - /// "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)" + String get you_are_blaklisted => " Đối phương đã đưa bạn vào danh sách đen"; + /// " Có chắc là bạn muốn phục hồi ảnh đã tiêu hủy không?\n (người dùng đã xem có thể xem lại lần nữa" @override - String get confrim_recovery => "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)"; - /// "發送到" + String get confrim_recovery => " Có chắc là bạn muốn phục hồi ảnh đã tiêu hủy không?\n (người dùng đã xem có thể xem lại lần nữa"; + /// " Gửi tới " @override - String get send_to => "發送到"; - /// "搜索位置" + String get send_to => " Gửi tới "; + /// " Tìm địa điểm" @override - String get search_plach => "搜索位置"; - /// "查找位置" + String get finding_place => " Tìm địa điểm"; + /// "Hỗ trợ nhanh" @override - String get finding_place => "查找位置"; - /// "实时帮" + String get real_time_helper => "Hỗ trợ nhanh"; + /// "Trợ lý phiên dịch" @override - String get real_time_helper => "实时帮"; - /// "翻译管家" + String get translation_butler => "Trợ lý phiên dịch"; + /// " Trợ lý chỉ đường" @override - String get translation_butler => "翻译管家"; - /// "出行管家" + String get travel_butler => " Trợ lý chỉ đường"; + /// "Trợ lý dịch thuật giúp bạn giải quyết trở ngại ngôn ngữ" @override - String get travel_butler => "出行管家"; - /// "您的实时贴身翻译,随时随地帮您解决语言不通" + String get translation_butler_tips => "Trợ lý dịch thuật giúp bạn giải quyết trở ngại ngôn ngữ"; + /// " Vui lòng chọn một ngôn ngữ để dịch " @override - String get translation_butler_tips => "您的实时贴身翻译,随时随地帮您解决语言不通"; - /// "请选择要翻译的语言" + String get choose_language => " Vui lòng chọn một ngôn ngữ để dịch "; + /// "Gọi trợ lý cần trả H-coin, thời gian sử dụng là 5 phút" @override - String get choose_language => "请选择要翻译的语言"; - /// "呼叫管家需要预付H币,管家服务时长为5分钟" + String get translation_butler_rules => "Gọi trợ lý cần trả H-coin, thời gian sử dụng là 5 phút"; + /// "Tình cảnh hiện nay của bạn" @override - String get translation_butler_rules => "呼叫管家需要预付H币,管家服务时长为5分钟"; - /// "您当所在场景" + String get translation_butler_scenes => "Tình cảnh hiện nay của bạn"; + /// "Dữ liệu cho thấy, những người dùng đã xác nhận tình cảnh và mô tả rõ vấn đề sẽ được hỗ trợ hiệu quả hơn." @override - String get translation_butler_scenes => "您当所在场景"; - /// "根据大数据显示,选择了场景并描述问题的用户得到了更有效的帮助哦!" + String get translation_butler_scenes_tips => "Dữ liệu cho thấy, những người dùng đã xác nhận tình cảnh và mô tả rõ vấn đề sẽ được hỗ trợ hiệu quả hơn."; + /// "Gọi trợ lý" @override - String get translation_butler_scenes_tips => "根据大数据显示,选择了场景并描述问题的用户得到了更有效的帮助哦!"; - /// "呼叫管家" + String get translation_butler_call => "Gọi trợ lý"; + /// " Vị trí của tôi" @override - String get translation_butler_call => "呼叫管家"; - /// "我的位置" + String get travel_my_location => " Vị trí của tôi"; + /// " Bạn muốn đi đâu " @override - String get travel_my_location => "我的位置"; - /// "你要去哪儿" + String get travel_go_where => " Bạn muốn đi đâu "; + /// "Định vị không đúng, bạn nên bấm \"kiểm tra khoảng cách\"" @override - String get travel_go_where => "你要去哪儿"; - /// "当前定位非实时监测,每次需点击“距离查询”按钮查询" - @override - String get travel_tips => "当前定位非实时监测,每次需点击“距离查询”按钮查询"; - /// "距离查询" + String get travel_tips => "Định vị không đúng, bạn nên bấm \"kiểm tra khoảng cách\""; + /// "Kiểm tra khoảng cách" @override - String get travel_check_distance => "距离查询"; - /// "根据定位查询,您的当前距离目标地点相距:" + String get travel_check_distance => "Kiểm tra khoảng cách"; + /// "Theo vị trí định vị, hiện nay bạn cách mục tiêu có:" @override - String get travel_check_distance_result => "根据定位查询,您的当前距离目标地点相距:"; - /// "当前排队人数过多,感谢您的耐心等待" + String get travel_check_distance_result => "Theo vị trí định vị, hiện nay bạn cách mục tiêu có:"; + /// "Hiện số người đang xếp hàng khá đông, cảm ơn bạn đã kiên nhẫn chờ đợi" @override - String get translation_butler_tips2 => "当前排队人数过多,感谢您的耐心等待"; - /// "正在为您呼叫管家" + String get translation_butler_tips2 => "Hiện số người đang xếp hàng khá đông, cảm ơn bạn đã kiên nhẫn chờ đợi"; + /// "Đang gọi trợ lý" @override - String get translation_butler_tips3 => "正在为您呼叫管家"; - /// "等待人数" + String get translation_butler_tips3 => "Đang gọi trợ lý"; + /// "Số người đang xếp hàng" @override - String get translation_butler_wait_people => "等待人数"; - /// "位" + String get translation_butler_wait_people => "Số người đang xếp hàng"; + /// "Người" @override - String get translation_butler_wait_people_unit => "位"; - /// "预计还需等待" + String get translation_butler_wait_people_unit => "Người"; + /// "Bạn còn phải đợi" @override - String get translation_butler_wait_time => "预计还需等待"; - /// "已等待" + String get translation_butler_wait_time => "Bạn còn phải đợi"; + /// " Đã Chờ" @override - String get translation_butler_already_wait => "已等待"; - /// "取消呼叫" + String get translation_butler_already_wait => " Đã Chờ"; + /// "Hủy dịch vụ" @override - String get translation_butler_cancel => "取消呼叫"; - /// "等待服务" + String get translation_butler_cancel => "Hủy dịch vụ"; + /// "Chờ dịch vụ" @override - String get translation_butler_wait_service => "等待服务"; - /// "实时帮-翻译管家" + String get translation_butler_wait_service => "Chờ dịch vụ"; + /// "Hỗ trợ nhanh- trợ lý phiên dịch" @override - String get translation_butler_dialog_title => "实时帮-翻译管家"; - /// "/s1通过系统下单" + String get translation_butler_dialog_title => "Hỗ trợ nhanh- trợ lý phiên dịch"; + /// "Bạn đã đặt dịch vụ qua hệ thống" @override - String get translation_butler_dialog_order => "/s1通过系统下单"; - /// "开始服务" + String get translation_butler_dialog_order => "Bạn đã đặt dịch vụ qua hệ thống"; + /// "Dịch vụ bắt đầu" @override - String get translation_butler_dialog_start_service => "开始服务"; - /// "开始聊天" + String get translation_butler_dialog_start_service => "Dịch vụ bắt đầu"; + /// " Bắt đầu trò chuyện " @override - String get translation_butler_dialog_start_chat => "开始聊天"; - /// "/s1H币//s2分钟" + String get translation_butler_dialog_start_chat => " Bắt đầu trò chuyện "; + /// "/s1H coin //s2 phút " @override - String get translation_butler_coin_time => "/s1H币//s2分钟"; - /// "结束服务" + String get translation_butler_coin_time => "/s1H coin //s2 phút "; + /// "Dịch vụ kết thúc" @override - String get translation_butler_end_service => "结束服务"; - /// "服务开始" + String get translation_butler_end_service => "Dịch vụ kết thúc"; + /// "Bắt đầu dịch vụ" @override - String get translation_butler_start_service => "服务开始"; - /// "服务结束" + String get translation_butler_start_service => "Bắt đầu dịch vụ"; + /// "Kết thúc dịch vụ" @override - String get translation_butler_service_end => "服务结束"; - /// "评价" + String get translation_butler_service_end => "Kết thúc dịch vụ"; + /// " Đánh giá" @override - String get translation_butler_evaluation => "评价"; - /// "翻译服务已开始,愿本次服务体验愉快" + String get translation_butler_evaluation => " Đánh giá"; + /// "Dịch vụ phiên dịch đã bắt đầu, hy vọng có thể khiến bạn hài lòng" @override - String get translation_butler_start_tips => "翻译服务已开始,愿本次服务体验愉快"; - /// "翻译服务已结束,体验愉快就给个评价吧" + String get translation_butler_start_tips => "Dịch vụ phiên dịch đã bắt đầu, hy vọng có thể khiến bạn hài lòng"; + /// "Dịch vụ phiên dịch đã kết thúc, hãy cho chúng tôi biết nếu bạn cảm thấy hài lòng." @override - String get translation_butler_evaluation_tips => "翻译服务已结束,体验愉快就给个评价吧"; - /// "你对本次服务满意吗?" + String get translation_butler_evaluation_tips => "Dịch vụ phiên dịch đã kết thúc, hãy cho chúng tôi biết nếu bạn cảm thấy hài lòng."; + /// " Bạn có hài lòng với dịch vụ này?" @override - String get translation_butler_dialog_tips => "你对本次服务满意吗?"; - /// "满意" + String get translation_butler_dialog_tips => " Bạn có hài lòng với dịch vụ này?"; + /// " Hài lòng " @override - String get translation_butler_dialog_yes => "满意"; - /// "不满意" + String get translation_butler_dialog_yes => " Hài lòng "; + /// " Không hài lòng " @override - String get translation_butler_dialog_no => "不满意"; - /// "提交评价" + String get translation_butler_dialog_no => " Không hài lòng "; + /// " Gửi đánh giá" @override - String get translation_butler_dialog_submit => "提交评价"; - /// "服务耐心" + String get translation_butler_dialog_submit => " Gửi đánh giá"; + /// "Kiên nhẫn" @override - String get translation_pos_1 => "服务耐心"; - /// "快速准时" + String get translation_pos_1 => "Kiên nhẫn"; + /// " Nhanh chóng kịp thời " @override - String get translation_pos_2 => "快速准时"; - /// "礼貌热情" + String get translation_pos_2 => " Nhanh chóng kịp thời "; + /// " Lịch sự nhiệt tình " @override - String get translation_pos_3 => "礼貌热情"; - /// "沟通顺畅" + String get translation_pos_3 => " Lịch sự nhiệt tình "; + /// "Giao tiếp trôi chảy" @override - String get translation_pos_4 => "沟通顺畅"; - /// "大神翻译" + String get translation_pos_4 => "Giao tiếp trôi chảy"; + /// "Dịch quá đỉnh" @override - String get translation_pos_5 => "大神翻译"; - /// "骚扰威胁" + String get translation_pos_5 => "Dịch quá đỉnh"; + /// " Đe dọa quấy rối " @override - String get translation_neg1 => "骚扰威胁"; - /// "沟通障碍" + String get translation_neg1 => " Đe dọa quấy rối "; + /// "Giao tiếp khó khăn" @override - String get translation_neg2 => "沟通障碍"; - /// "响应缓慢" + String get translation_neg2 => "Giao tiếp khó khăn"; + /// "Phản hồi chậm" @override - String get translation_neg3 => "响应缓慢"; - /// "态度不好" + String get translation_neg3 => "Phản hồi chậm"; + /// " Thái độ không tốt " @override - String get translation_neg4 => "态度不好"; - /// "翻译不行" + String get translation_neg4 => " Thái độ không tốt "; + /// "Phiên dịch không tốt" @override - String get translation_neg5 => "翻译不行"; - /// "机场/车站" + String get translation_neg5 => "Phiên dịch không tốt"; + /// "Sân bay/ bến xe" @override - String get translation_scenes_1 => "机场/车站"; - /// "餐厅/酒店" + String get translation_scenes_1 => "Sân bay/ bến xe"; + /// " Nhà hàng / khách sạn " @override - String get translation_scenes_2 => "餐厅/酒店"; - /// "KTV/酒吧" + String get translation_scenes_2 => " Nhà hàng / khách sạn "; + /// " KTV/ Bar " @override - String get translation_scenes_3 => "KTV/酒吧"; - /// "其他" + String get translation_scenes_3 => " KTV/ Bar "; + /// " Khác " @override - String get translation_scenes_4 => "其他"; - /// "文件" + String get translation_scenes_4 => " Khác "; + /// "file" @override - String get file => "文件"; - /// "文件大于/s1M" + String get file => "file"; + /// "File lớn hơn /s1M" @override - String get max_file => "文件大于/s1M"; - /// "还可以输入/s1字" + String get max_file => "File lớn hơn /s1M"; + /// "Bạn còn có thể nhập /s1 ký tự" @override - String get translation_input_limit => "还可以输入/s1字"; - /// "更多描述" + String get translation_input_limit => "Bạn còn có thể nhập /s1 ký tự"; + /// "Mô tả thêm " @override - String get translation_more_desc => "更多描述"; - /// "反馈小助手" + String get translation_more_desc => "Mô tả thêm "; + /// "Trợ giúp phản hồi" @override - String get feedback_assistant => "反馈小助手"; - /// "有什么问题都可以反馈给我哦" + String get feedback_assistant => "Trợ giúp phản hồi"; + /// "Nếu gặp phải vấn đề bạn có thể phản hồi với chúng tôi!" @override - String get feedback_tips => "有什么问题都可以反馈给我哦"; + String get feedback_tips => "Nếu gặp phải vấn đề bạn có thể phản hồi với chúng tôi!"; /// "人工重译" @override String get man_retranslate => "人工重译"; diff --git a/lib/home/friend_page.dart b/lib/home/friend_page.dart index 44ae8a1..df41e8d 100644 --- a/lib/home/friend_page.dart +++ b/lib/home/friend_page.dart @@ -290,12 +290,6 @@ class _FriendPageState extends State { const Color(0xFF088E76), ]), onPressed: () async { - CustomUI.buildContacts(context, I18n.of(context).privacyAgreement, - I18n.of(context).determine, () { - Navigator.of(context).pop(); - showPermission(); - }, title: I18n.of(context).tip); - return; final PermissionStatus addStatus = await PermissionHandler() .checkPermissionStatus(PermissionGroup.contacts); if ((addStatus == PermissionStatus.unknown || @@ -487,7 +481,7 @@ class _FriendPageState extends State { avatar: _contact.avatar, title: Provider.of(context) .getRefName(_contact.friendId, _contact.name), - isShowDivder: _isGroupTitle, + isShowDivder: true, groupTitle: _isGroupTitle ? _contact.nameTag : null); }, itemCount: friendList.length + _functionButtons.length, diff --git a/lib/utils/CustomUI.dart b/lib/utils/CustomUI.dart index 268775a..f711477 100644 --- a/lib/utils/CustomUI.dart +++ b/lib/utils/CustomUI.dart @@ -6,6 +6,7 @@ import 'package:chat/data/WebData.dart'; import 'package:chat/data/constants.dart'; import 'package:chat/generated/i18n.dart'; import 'package:chat/home/VerificationCenter.dart'; +import 'package:chat/home/VipPage.dart'; import 'package:chat/home/realtimehelper/translation_evaluation_dialog.dart'; import 'package:chat/models/group_info_model.dart'; import 'package:chat/photo/ui/dialog/not_permission_dialog.dart'; @@ -61,7 +62,17 @@ class CustomUI { bool isAd = false, bool isMyself = false}) { if (UserData().isMan() && !UserData().isVip && !isMyself) { - showToast(I18n.of(context).cant_comment); + CustomUI.buildOneConfirm( + context, I18n.of(context).cant_comment, I18n.of(context).joinvip, () { + Navigator.of(context).pop(); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return VipPage(); + }, + ), + ); + }); return; } if (!UserData().isMan() && !UserData().basicInfo.isAttestation) { @@ -309,14 +320,13 @@ class CustomUI { title, buildConfirmContent( Container( - alignment: Alignment.center, + alignment: Alignment.center, padding: EdgeInsets.only(top: 38.5, bottom: 31.5), child: Column( children: [ Text( tipTitle, textScaleFactor: 1.0, - style: TextStyle( fontSize: 14, color: Constants.BlackTextColor, @@ -1253,11 +1263,10 @@ class CustomUI { ); } - - - ///** isUser 是否是用户,或为 翻译 - static void buildTranslationHelperOrderDialog(BuildContext context,bool isUser,{String orderId,int scenes=0,String desc}) { - + ///** isUser 是否是用户,或为 翻译 + static void buildTranslationHelperOrderDialog( + BuildContext context, bool isUser, + {String orderId, int scenes = 0, String desc}) { var scenesList = [ I18n.of(context).translation_scenes_1, I18n.of(context).translation_scenes_2, @@ -1288,85 +1297,111 @@ class CustomUI { ), child: Container( // color: Colors.yellow, - width: double.maxFinite, - padding: EdgeInsets.all(16), - child: Column( - - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15), - child: Text( - I18n.of(context).translation_butler_dialog_title, - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - fontWeight: FontWeight.w500, - color: AppColors.NewAppbarTextColor, fontSize: 17), - ), - ), - Text( - I18n.of(context).translation_butler_dialog_order.replaceAll('/s1',isUser?I18n.of(context).you: 'xxx'), - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: AppColors.NewAppbarTextColor, fontSize: 14), - ), - SizedBox(height: 10,), - Text( - '时间:今天11:45 时长:5分钟', - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: Color(0xFF797979), fontSize: 11), - ), - - isUser?Container():Text( - '场景:${scenesList[scenes]}', - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: Color(0xFF797979), fontSize: 11), - ), - - isUser?Container():Text( - '更多描述:$desc}', - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: Color(0xFF797979), fontSize: 11), - ), -// - Container(margin: EdgeInsets.only(left: 30, right: 30, top: 20,bottom: 10),child: isUser?Container( - margin: EdgeInsets.only( top: 10), - height: 36, - alignment: Alignment.center, - child: RaisedButton( - color: Color(0xff3875E9), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(10))), - child: Padding(padding: EdgeInsets.only(left: 10,right: 10),child: Text( - I18n.of(context).translation_butler_dialog_start_chat , + width: double.maxFinite, + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 15), + child: Text( + I18n.of(context).translation_butler_dialog_title, + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w500, + color: AppColors.NewAppbarTextColor, + fontSize: 17), + ), + ), + Text( + I18n.of(context) + .translation_butler_dialog_order + .replaceAll( + '/s1', isUser ? I18n.of(context).you : 'xxx'), textScaleFactor: 1.0, - style: TextStyle(color: Colors.white, fontSize: 15,fontWeight: FontWeight.w500), - - ),), - onPressed:(){ - Navigator.of(context)..pop(); - } ), - ):CountDownButton( I18n.of(context).translation_butler_dialog_start_service,(){ - - MsgHandler.sendReceiveOrder(orderId); - Navigator.of(context).pop(); - }) ,) - + textAlign: TextAlign.left, + style: TextStyle( + color: AppColors.NewAppbarTextColor, fontSize: 14), + ), + SizedBox( + height: 10, + ), + Text( + '时间:今天11:45 时长:5分钟', + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: + TextStyle(color: Color(0xFF797979), fontSize: 11), + ), + isUser + ? Container() + : Text( + '场景:${scenesList[scenes]}', + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: TextStyle( + color: Color(0xFF797979), fontSize: 11), + ), - ], - ), - ), - ), - ),),),),)); + isUser + ? Container() + : Text( + '更多描述:$desc}', + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: TextStyle( + color: Color(0xFF797979), fontSize: 11), + ), +// + Container( + margin: EdgeInsets.only( + left: 30, right: 30, top: 20, bottom: 10), + child: isUser + ? Container( + margin: EdgeInsets.only(top: 10), + height: 36, + alignment: Alignment.center, + child: RaisedButton( + color: Color(0xff3875E9), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(10))), + child: Padding( + padding: + EdgeInsets.only(left: 10, right: 10), + child: Text( + I18n.of(context) + .translation_butler_dialog_start_chat, + textScaleFactor: 1.0, + style: TextStyle( + color: Colors.white, + fontSize: 15, + fontWeight: FontWeight.w500), + ), + ), + onPressed: () { + Navigator.of(context)..pop(); + }), + ) + : CountDownButton( + I18n.of(context) + .translation_butler_dialog_start_service, + () { + MsgHandler.sendReceiveOrder(orderId); + Navigator.of(context).pop(); + }), + ) + ], + ), + ), + ), + ), + ), + ), + ), + )); } static void buildTranslationEvaluationDialog(BuildContext context) { diff --git a/lib/utils/HttpUtil.dart b/lib/utils/HttpUtil.dart index a2eae7f..ae16e6b 100644 --- a/lib/utils/HttpUtil.dart +++ b/lib/utils/HttpUtil.dart @@ -543,6 +543,7 @@ class HttpUtil { saveAotuLoginKey(resData, isSaveUserId: false); return; } + LocalNotificationUtil.instance.startPush(); //ChatDataMgr().initMsg(); Navigator.of(context) diff --git a/lib/utils/MessageBox.dart b/lib/utils/MessageBox.dart index 3864155..3c70f3a 100644 --- a/lib/utils/MessageBox.dart +++ b/lib/utils/MessageBox.dart @@ -5,6 +5,7 @@ import 'package:chat/generated/i18n.dart'; import 'package:chat/home/InformUser.dart'; import 'package:chat/home/ProfilePage.dart'; import 'package:chat/home/ProgramDetail.dart'; +import 'package:chat/home/VipPage.dart'; import 'package:chat/models/ref_name_provider.dart'; import 'package:chat/utils/CustomUI.dart'; import 'package:chat/utils/HttpUtil.dart'; @@ -85,7 +86,7 @@ class _MessageBoxState extends State { ), ); } else if (str == 'black') { - HttpUtil().blackUser(userId, () {}); + HttpUtil().blackUser(userId, () {}); } else if (str == 'noContent') { var data = { "userId": UserData().basicInfo.userId, @@ -394,7 +395,19 @@ class _MessageBoxState extends State { } : () async { if ((UserData().isMan() && !UserData().isVip)) { - showToast(I18n.of(context).cannot_join); + CustomUI.buildOneConfirm( + context, + I18n.of(context).cannot_join, + I18n.of(context).joinvip, () { + Navigator.of(context).pop(); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return VipPage(); + }, + ), + ); + }); return; } if ((!UserData().isMan() && @@ -481,7 +494,7 @@ class _MessageBoxState extends State { _buildTimebox(data), _buildImgSet(data), _buildImgList(data), - widget.isDetail ? Container() : _buildDivder(), + widget.isDetail ? Container() : _buildDivder(), _buildIconButtonList(data), //_buildContent(), ], diff --git a/lib/utils/friend_list_mgr.dart b/lib/utils/friend_list_mgr.dart index 61962d3..44494ca 100644 --- a/lib/utils/friend_list_mgr.dart +++ b/lib/utils/friend_list_mgr.dart @@ -2,6 +2,7 @@ import 'package:chat/models/UserInfo.dart'; import 'package:chat/utils/HttpUtil.dart'; import 'package:chat/utils/conversation_table.dart'; import 'package:chat/utils/sql_util.dart'; +import 'package:chat/utils/TokenMgr.dart'; class FriendListMgr { // 工厂模式 @@ -76,8 +77,7 @@ class FriendListMgr { } //删除所有好友 - deleteAllFriend(){ - + deleteAllFriend() { friendList.clear(); SqlUtil.friendTableModel.clear(); } @@ -112,4 +112,19 @@ class FriendListMgr { } } } + + //从服务器校验好友 + checkFromServer(String sign) async { + List friendList = + await SqlUtil.friendTableModel.getAllConversation(); + List idList = []; + for (var model in friendList) { + idList.add(model.friendId); + } + idList.sort(); + String md5 = TokenMgr().generateMd5(idList.join(',')); + if (friendList.length == 0 || md5 != sign) { + getFriendListFromServer(); + } + } } diff --git a/pubspec.lock b/pubspec.lock index aa6333a..7091cf6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -80,7 +80,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: a5158bdf4d39186bca8407575fcee06f3a720a95 + resolved-ref: c623cb92b0d9f84afbbedce5b25162732e65cef0 url: "https://github.com/randomjoho/audioplayer.git" source: git version: "0.5.2"