ソースを参照

Merge branch 'v1.1.0' into v1.1.0-iOS

“HeShaoZe” 5 ヶ月 前
コミット
4a45ba0a53
2 ファイル変更11 行追加3 行削除
  1. 10 2
      lib/module/track/track_day_detail/track_share_view.dart
  2. 1 1
      pubspec.yaml

+ 10 - 2
lib/module/track/track_day_detail/track_share_view.dart

@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:location/data/api/response/track_daily_summary_response.dart';
 import 'package:location/data/bean/user_info.dart';
+import 'package:location/data/repositories/account_repository.dart';
 import 'package:location/resource/assets.gen.dart';
 import 'package:location/resource/string.gen.dart';
 import 'package:location/utils/common_expand.dart';
@@ -266,7 +267,7 @@ class TrackShareView extends StatelessWidget {
             ),
           ),
           SizedBox(height: 6.w),
-          Text(getUserName(userInfo.phoneNumber),
+          Text(getUserName(),
               style: TextStyle(
                   fontSize: 12.sp,
                   color: '#333333'.color,
@@ -276,7 +277,14 @@ class TrackShareView extends StatelessWidget {
     );
   }
 
-  String getUserName(String phone) {
+  String getUserName() {
+    String phone;
+    if (userInfo.isMine == true) {
+      phone = AccountRepository.getInstance().loginPhoneNum.value ??
+          userInfo.phoneNumber;
+    } else {
+      phone = userInfo.phoneNumber;
+    }
     if (phone.length > 4) {
       phone = phone.substring(phone.length - 4);
     }

+ 1 - 1
pubspec.yaml

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # In Windows, build-name is used as the major, minor, and patch parts
 # of the product and file versions while build-number is used as the build suffix.
-version: 1.1.0+110
+version: 1.1.1+111
 
 environment:
   sdk: ^3.5.0