Browse Source

打点更新

周睿 2 years ago
parent
commit
6713329827

+ 1 - 0
.gitignore

@@ -42,3 +42,4 @@ app.*.map.json
 /android/app/debug
 /android/app/profile
 /android/app/release
+*.lock

+ 1 - 0
ios/Flutter/Debug.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
 #include "Generated.xcconfig"

+ 1 - 0
ios/Flutter/Release.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
 #include "Generated.xcconfig"

+ 1 - 1
ios/Runner.xcodeproj/project.pbxproj

@@ -168,7 +168,7 @@
 		97C146E61CF9000F007C117D /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 1300;
+				LastUpgradeCheck = 1430;
 				ORGANIZATIONNAME = "";
 				TargetAttributes = {
 					331C8080294A63A400263BE5 = {

+ 1 - 1
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1430"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 8 - 7
lib/view/home/field_control/field_control.dart

@@ -53,9 +53,10 @@ class FieldControlPage extends StatelessWidget {
       ViewMapImage(map.plugMap),
     ];
 
-    final focusUser = c.focusUser.value;
+    final focusUser = c.focusUser;
     if (focusUser != null) {
       children.add(ViewMapCP(
+        key:UniqueKey(),
         map.plugMap,
         cpWantAndHistoryList: focusUser.cpList,
         isHideRouteBeforeStart: false,
@@ -226,19 +227,19 @@ class _UserInfoView extends GetView<FieldControlController> {
               ),
               GestureDetector(
                 onTap: () {
-                  final old = controller.focusUser.value;
-                  if(old != null){
-                    if(old.id == data.id){
-                      controller.focusUser.value = null;
+                  final oldId = controller.focusUserId.value;
+                  if(oldId != null){
+                    if(oldId == data.id){
+                      controller.focusUserId.value = null;
                       return;
                     }
                   }
-                  controller.focusUser.value = data;
+                  controller.focusUserId.value = data.id;
                 },
                 child: Obx(() => Icon(
                       Icons.route,
                       color: data.gameInfo.userId !=
-                              controller.focusUser.value?.gameInfo.userId
+                              controller.focusUser?.gameInfo.userId
                           ? Colors.grey
                           : const Color(0xffffbb77),
                     )),

+ 16 - 2
lib/view/home/field_control/field_control_controller.dart

@@ -16,6 +16,20 @@ class FieldControlController extends GetxController {
   HomeController get _home => Get.find();
   MapWatchService? get mapWatch => MapWatchService.instance;
   final activeList = <ActiveInfo>[].obs;
-  final Rx<UserInfo?> focusUser = Rx(null);
-  
+  // final Rx<UserInfo?> focusUser = Rx(null);
+  final Rx<int?> focusUserId = Rx(null);
+  UserInfo? get focusUser{
+    if(focusUserId.value== null){
+      return null;
+    }
+
+    for(final act in activeList){
+      for(final user in act.userList){
+        if(user.id == focusUserId.value){
+          return user;
+        }
+      }
+    }
+    return null;
+  }
 }

+ 1 - 0
macos/Flutter/Flutter-Debug.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
 #include "ephemeral/Flutter-Generated.xcconfig"

+ 1 - 0
macos/Flutter/Flutter-Release.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
 #include "ephemeral/Flutter-Generated.xcconfig"

+ 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.0.2+1
+version: 1.0.3+1
 
 environment:
   sdk: '>=3.0.6 <4.0.0'