feat: Add sharePadSupplies setting and update SharingSettingsScreen

- Add sharePadSupplies field to UserProfile model (HiveField 58)
- Update SharingSettingsScreen: Pad Supplies toggle disabled when pad tracking off
- Update SharingSettingsScreen: Intimacy sharing always enabled (it's their husband)
- Regenerate Hive adapters
This commit is contained in:
2026-01-09 21:32:40 -06:00
parent 1c2c56e9e2
commit 0a72259a9a
2 changed files with 11 additions and 2 deletions

View File

@@ -316,6 +316,9 @@ class UserProfile extends HiveObject {
@HiveField(57)
String? partnerId; // ID of the partner to sync with
@HiveField(58, defaultValue: true)
bool sharePadSupplies; // Share pad supply data with partner
UserProfile({
required this.id,
required this.name,
@@ -374,6 +377,7 @@ class UserProfile extends HiveObject {
this.husbandAccentColor = '0xFF1A3A5C',
this.useExampleData = false,
this.partnerId,
this.sharePadSupplies = true,
});
/// Check if user is married
@@ -457,6 +461,7 @@ class UserProfile extends HiveObject {
String? husbandAccentColor,
bool? useExampleData,
String? partnerId,
bool? sharePadSupplies,
}) {
return UserProfile(
id: id ?? this.id,
@@ -519,6 +524,7 @@ class UserProfile extends HiveObject {
husbandAccentColor: husbandAccentColor ?? this.husbandAccentColor,
useExampleData: useExampleData ?? this.useExampleData,
partnerId: partnerId ?? this.partnerId,
sharePadSupplies: sharePadSupplies ?? this.sharePadSupplies,
);
}
}

View File

@@ -124,13 +124,14 @@ class UserProfileAdapter extends TypeAdapter<UserProfile> {
fields[55] == null ? '0xFF1A3A5C' : fields[55] as String,
useExampleData: fields[56] == null ? false : fields[56] as bool,
partnerId: fields[57] as String?,
sharePadSupplies: fields[58] == null ? true : fields[58] as bool,
);
}
@override
void write(BinaryWriter writer, UserProfile obj) {
writer
..writeByte(57)
..writeByte(58)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -244,7 +245,9 @@ class UserProfileAdapter extends TypeAdapter<UserProfile> {
..writeByte(56)
..write(obj.useExampleData)
..writeByte(57)
..write(obj.partnerId);
..write(obj.partnerId)
..writeByte(58)
..write(obj.sharePadSupplies);
}
@override