Commit 3bde5fcdd5b3ac32adbbf3a0e09895301dcbd889

Authored by 常守达
1 parent d16f2b12

fix(today):上传去掉loading

@@ -257,14 +257,14 @@ class TodayController extends GetMaterialController { @@ -257,14 +257,14 @@ class TodayController extends GetMaterialController {
257 bool success = await _hostApi.requestHealthClientAuthorization(); 257 bool success = await _hostApi.requestHealthClientAuthorization();
258 AppLogger.d("requestHealthClientAuthorization : $success"); 258 AppLogger.d("requestHealthClientAuthorization : $success");
259 if (success) { 259 if (success) {
260 - await LoadingService.instance.run(() async {  
261 - try {  
262 - final result = await _hostApi.performHealthUpload();  
263 - } catch (error, stackTrace) {  
264 - AppLogger.e('Apple Health upload failed', error, stackTrace);  
265 - }  
266 - });  
267 - result.status = 1; 260 + // await LoadingService.instance.run(() async {
  261 + try {
  262 + final result = _hostApi.performHealthUpload();
  263 + } catch (error, stackTrace) {
  264 + AppLogger.e('Apple Health upload failed', error, stackTrace);
  265 + }
  266 + // });
  267 + // result.status = 1;
268 // AppToast.show('刷新完成'); 268 // AppToast.show('刷新完成');
269 if (isFromNoPermissionPage) { 269 if (isFromNoPermissionPage) {
270 Get.back(); 270 Get.back();
@@ -276,13 +276,13 @@ class TodayController extends GetMaterialController { @@ -276,13 +276,13 @@ class TodayController extends GetMaterialController {
276 } 276 }
277 return; 277 return;
278 } else if (result.status == 1) { 278 } else if (result.status == 1) {
279 - await LoadingService.instance.run(() async {  
280 - try {  
281 - final result = await _hostApi.performHealthUpload();  
282 - } catch (error, stackTrace) {  
283 - AppLogger.e('Apple Health upload failed', error, stackTrace);  
284 - }  
285 - }); 279 + // await LoadingService.instance.run(() async {
  280 + try {
  281 + final result = _hostApi.performHealthUpload();
  282 + } catch (error, stackTrace) {
  283 + AppLogger.e('Apple Health upload failed', error, stackTrace);
  284 + }
  285 + // });
286 if (isFromNoPermissionPage) { 286 if (isFromNoPermissionPage) {
287 Get.back(); 287 Get.back();
288 } 288 }
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 "phoneLoginCodeSentSuccess": "Code sent", 105 "phoneLoginCodeSentSuccess": "Code sent",
106 "phoneLoginInvalidCode": "Invalid verification code", 106 "phoneLoginInvalidCode": "Invalid verification code",
107 "todayHealthDataAuthTitle": "Unable to access heart rate health data", 107 "todayHealthDataAuthTitle": "Unable to access heart rate health data",
108 - "todayHealthDataAuthDescription": "DoubleFeel needs permission to access your health data to provide stress reminders, real-time stress statistics, and health suggestions. Otherwise, some app features may not work properly. Your health data is stored locally only and will not be uploaded to any server.", 108 + "todayHealthDataAuthDescription": "DoubleFeel needs access to your Apple Health data to provide stress reminders, real-time stress statistics, and health suggestions.\nIf you have not authorized it yet, please click below to complete the authorization; if you have authorized it, it may take a few minutes to sync a large amount of health data for the first time, please try again later.",
109 "todayHealthDataAuthAction": "Authorize health data access", 109 "todayHealthDataAuthAction": "Authorize health data access",
110 "measureYourHrvNow": "Measure your HRV now", 110 "measureYourHrvNow": "Measure your HRV now",
111 "todayBottomSheetGotIt": "Got it", 111 "todayBottomSheetGotIt": "Got it",
@@ -182,7 +182,7 @@ @@ -182,7 +182,7 @@
182 "@todayHealthDataAuthTitle": { 182 "@todayHealthDataAuthTitle": {
183 "description": "今日页健康数据授权卡片标题" 183 "description": "今日页健康数据授权卡片标题"
184 }, 184 },
185 - "todayHealthDataAuthDescription": "DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。", 185 + "todayHealthDataAuthDescription": "DoubleFeel 需要访问你的 Apple 健康数据,以提供压力提醒、实时压力统计和健康建议。\n如果尚未授权,请点击下方完成授权;如果已经授权,首次同步大量健康数据可能需要等待几分钟,请稍后再试。",
186 "@todayHealthDataAuthDescription": { 186 "@todayHealthDataAuthDescription": {
187 "description": "今日页健康数据授权卡片说明" 187 "description": "今日页健康数据授权卡片说明"
188 }, 188 },
@@ -732,7 +732,7 @@ abstract class AppLocalizations { @@ -732,7 +732,7 @@ abstract class AppLocalizations {
732 /// 今日页健康数据授权卡片说明 732 /// 今日页健康数据授权卡片说明
733 /// 733 ///
734 /// In zh, this message translates to: 734 /// In zh, this message translates to:
735 - /// **'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'** 735 + /// **'DoubleFeel 需要访问你的 Apple 健康数据,以提供压力提醒、实时压力统计和健康建议。\n如果尚未授权,请点击下方完成授权;如果已经授权,首次同步大量健康数据可能需要等待几分钟,请稍后再试。'**
736 String get todayHealthDataAuthDescription; 736 String get todayHealthDataAuthDescription;
737 737
738 /// 今日页健康数据授权卡片按钮文案 738 /// 今日页健康数据授权卡片按钮文案
@@ -351,7 +351,7 @@ class AppLocalizationsEn extends AppLocalizations { @@ -351,7 +351,7 @@ class AppLocalizationsEn extends AppLocalizations {
351 351
352 @override 352 @override
353 String get todayHealthDataAuthDescription => 353 String get todayHealthDataAuthDescription =>
354 - 'DoubleFeel needs permission to access your health data to provide stress reminders, real-time stress statistics, and health suggestions. Otherwise, some app features may not work properly. Your health data is stored locally only and will not be uploaded to any server.'; 354 + 'DoubleFeel needs access to your Apple Health data to provide stress reminders, real-time stress statistics, and health suggestions.\nIf you have not authorized it yet, please click below to complete the authorization; if you have authorized it, it may take a few minutes to sync a large amount of health data for the first time, please try again later.';
355 355
356 @override 356 @override
357 String get todayHealthDataAuthAction => 'Authorize health data access'; 357 String get todayHealthDataAuthAction => 'Authorize health data access';
@@ -334,7 +334,7 @@ class AppLocalizationsZh extends AppLocalizations { @@ -334,7 +334,7 @@ class AppLocalizationsZh extends AppLocalizations {
334 334
335 @override 335 @override
336 String get todayHealthDataAuthDescription => 336 String get todayHealthDataAuthDescription =>
337 - 'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'; 337 + 'DoubleFeel 需要访问你的 Apple 健康数据,以提供压力提醒、实时压力统计和健康建议。\n如果尚未授权,请点击下方完成授权;如果已经授权,首次同步大量健康数据可能需要等待几分钟,请稍后再试。';
338 338
339 @override 339 @override
340 String get todayHealthDataAuthAction => '授权访问健康数据'; 340 String get todayHealthDataAuthAction => '授权访问健康数据';