Commit f4a751587019831f3f1882644dc24a6baaaa3403

Authored by 权海
1 parent 0520b64f

feat(ui):同步表盘

@@ -342,14 +342,10 @@ @@ -342,14 +342,10 @@
342 inputFileListPaths = ( 342 inputFileListPaths = (
343 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 343 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
344 ); 344 );
345 - inputPaths = (  
346 - );  
347 name = "[CP] Embed Pods Frameworks"; 345 name = "[CP] Embed Pods Frameworks";
348 outputFileListPaths = ( 346 outputFileListPaths = (
349 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 347 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
350 ); 348 );
351 - outputPaths = (  
352 - );  
353 runOnlyForDeploymentPostprocessing = 0; 349 runOnlyForDeploymentPostprocessing = 0;
354 shellPath = /bin/sh; 350 shellPath = /bin/sh;
355 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 351 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -420,14 +416,10 @@ @@ -420,14 +416,10 @@
420 inputFileListPaths = ( 416 inputFileListPaths = (
421 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", 417 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
422 ); 418 );
423 - inputPaths = (  
424 - );  
425 name = "[CP] Copy Pods Resources"; 419 name = "[CP] Copy Pods Resources";
426 outputFileListPaths = ( 420 outputFileListPaths = (
427 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", 421 "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
428 ); 422 );
429 - outputPaths = (  
430 - );  
431 runOnlyForDeploymentPostprocessing = 0; 423 runOnlyForDeploymentPostprocessing = 0;
432 shellPath = /bin/sh; 424 shellPath = /bin/sh;
433 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; 425 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -189,7 +189,20 @@ class CustomWatchThemePreviewController extends GetxController { @@ -189,7 +189,20 @@ class CustomWatchThemePreviewController extends GetxController {
189 await Get.bottomSheet<void>( 189 await Get.bottomSheet<void>(
190 WatchThemeSyncDialog( 190 WatchThemeSyncDialog(
191 themeImageUrl: themeItem.energeticImage, 191 themeImageUrl: themeItem.energeticImage,
192 - onSync: applyAndSyncWatchFace, 192 + onSync: () async {
  193 + if (device?.isPaired != true ||
  194 + device?.isWatchAppInstalled != true ||
  195 + device?.isReachable != true) {
  196 + Get.back();
  197 + await Get.dialog<void>(
  198 + const WatchThemeNoWatchDialog(),
  199 + barrierColor: const Color(0xB3000000),
  200 + );
  201 + return false;
  202 + }
  203 +
  204 + return await applyAndSyncWatchFace();
  205 + },
193 ), 206 ),
194 backgroundColor: Colors.transparent, 207 backgroundColor: Colors.transparent,
195 barrierColor: const Color(0xB3000000), 208 barrierColor: const Color(0xB3000000),
@@ -160,7 +160,20 @@ class WatchThemePreviewController extends GetxController { @@ -160,7 +160,20 @@ class WatchThemePreviewController extends GetxController {
160 await Get.bottomSheet<void>( 160 await Get.bottomSheet<void>(
161 WatchThemeSyncDialog( 161 WatchThemeSyncDialog(
162 themeImageUrl: themeItem.energeticImage, 162 themeImageUrl: themeItem.energeticImage,
163 - onSync: applyAndSyncWatchFace, 163 + onSync: () async {
  164 + if (device?.isPaired != true ||
  165 + device?.isWatchAppInstalled != true ||
  166 + device?.isReachable != true) {
  167 + Get.back();
  168 + await Get.dialog<void>(
  169 + const WatchThemeNoWatchDialog(),
  170 + barrierColor: const Color(0xB3000000),
  171 + );
  172 + return false;
  173 + }
  174 +
  175 + return await applyAndSyncWatchFace();
  176 + },
164 ), 177 ),
165 backgroundColor: Colors.transparent, 178 backgroundColor: Colors.transparent,
166 barrierColor: const Color(0xB3000000), 179 barrierColor: const Color(0xB3000000),