|
@@ -336,7 +336,8 @@ class TodayController extends GetMaterialController { |
|
@@ -336,7 +336,8 @@ class TodayController extends GetMaterialController { |
|
336
|
[HealthAuthorization? preResult]) async {
|
336
|
[HealthAuthorization? preResult]) async {
|
|
337
|
try {
|
337
|
try {
|
|
338
|
final result = preResult ?? await _hostApi.checkHealthAppAuthorization();
|
338
|
final result = preResult ?? await _hostApi.checkHealthAppAuthorization();
|
|
339
|
- ta.userSet({'health_data_permission': result.status.clamp(0, 1)});
|
339
|
+ ta.setSuperProperties(
|
|
|
|
340
|
+ {'health_data_permission': result.status.clamp(0, 1)});
|
|
340
|
if (result.status == 1) {
|
341
|
if (result.status == 1) {
|
|
341
|
await _performDataUpload();
|
342
|
await _performDataUpload();
|
|
342
|
}
|
343
|
}
|
|
@@ -352,7 +353,8 @@ class TodayController extends GetMaterialController { |
|
@@ -352,7 +353,8 @@ class TodayController extends GetMaterialController { |
|
352
|
Future<void> checkNotificationCardVisible() async {
|
353
|
Future<void> checkNotificationCardVisible() async {
|
|
353
|
try {
|
354
|
try {
|
|
354
|
Permission.notification.status.then((status) {
|
355
|
Permission.notification.status.then((status) {
|
|
355
|
- ta.userSet({'notification_permission': status.isGranted ? 1 : 0});
|
356
|
+ ta.setSuperProperties(
|
|
|
|
357
|
+ {'notification_permission': status.isGranted ? 1 : 0});
|
|
356
|
// if (status.isGranted) {
|
358
|
// if (status.isGranted) {
|
|
357
|
// return;
|
359
|
// return;
|
|
358
|
// }
|
360
|
// }
|