Commit bb25c4b66428010c75ac37161665a60f8db98252

Authored by 刘宏哲
1 parent 549eed07

feat(app): bug fixed

... ... @@ -40,7 +40,7 @@ class FriendTrendController extends GetxController with HealthTrendControl {
);
HealthReportQuery queryForType(int typeIndex) => HealthReportQuery(
targetUserId: friendItem?.id,
targetUserId: friendItem?.friendUserId,
period: periodForType(typeIndex),
date: dateForType(typeIndex),
);
... ...
import 'package:doublefeel_flutter/app/modules/hrv_report/models/hrv_report_models.dart';
import 'package:doublefeel_flutter/app/modules/home/widgets/df_tab_bar.dart';
import 'package:doublefeel_flutter/app/modules/hrv_report/models/hrv_report_models.dart';
import 'package:doublefeel_flutter/app/routes/app_pages.dart';
import 'package:doublefeel_flutter/core/constants/intent_keys.dart';
import 'package:doublefeel_flutter/core/util/app_toast.dart';
... ... @@ -17,7 +17,7 @@ import '../widgets/friend_health_card.dart';
class FriendsTab extends GetView<FriendsController> {
const FriendsTab({super.key});
static const double _floatingAddButtonGap = 23;
static const double _floatingAddButtonGapAboveTabBar = 23;
@override
Widget build(BuildContext context) {
... ... @@ -225,13 +225,13 @@ class FriendsTab extends GetView<FriendsController> {
}
double _floatingAddButtonBottom(BuildContext context) {
return _tabBarAvoidanceBottom(context) + _floatingAddButtonGap;
return _tabBarAvoidanceBottom(context) + _floatingAddButtonGapAboveTabBar;
}
double _tabBarAvoidanceBottom(BuildContext context) {
return MediaQuery.viewPaddingOf(context).bottom +
DfTabBar.height +
DfTabBar.bottomMargin;
final bottomInset =
Theme.of(context).platform == TargetPlatform.iOS ? 34.0 : 0.0;
return bottomInset + DfTabBar.height + DfTabBar.bottomMargin;
}
double _friendsListBottomPadding(
... ... @@ -244,8 +244,10 @@ class FriendsTab extends GetView<FriendsController> {
Future<void> _handleAddFriend() async {
final Type type = FriendsTab;
final String name = type.toString();
await Get.toNamed(AppRoutes.bindPartner,
arguments: {IntentKeys.keyFrom: name});
await Get.toNamed(
AppRoutes.bindPartner,
arguments: {IntentKeys.keyFrom: name},
);
await controller.loadFriends();
}
... ...
... ... @@ -27,7 +27,7 @@ class PrivacySettingsController extends GetxController {
isUpdatingEnableAddWithUCode.value = true;
try {
final result = await _userApi.updateOwnerUserInfo(
enableAddWithUcode: enabled ? 1 : 0,
enableAddWithUcode: enabled ? 0 : 1,
);
if (result is AppSuccess<UserInfoResponse>) {
await _userPreferencesStorage.updateMeUserInfo(result.data);
... ...