fix sync and show the button on iOS only
This commit is contained in:
@@ -265,7 +265,7 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
|||||||
final map = metadata.value as Map<String, Object?>;
|
final map = metadata.value as Map<String, Object?>;
|
||||||
final companion = RemoteAssetCloudIdEntityCompanion(cloudId: Value(map['iCloudId']?.toString()));
|
final companion = RemoteAssetCloudIdEntityCompanion(cloudId: Value(map['iCloudId']?.toString()));
|
||||||
batch.insert(
|
batch.insert(
|
||||||
_db.remoteAssetEntity,
|
_db.remoteAssetCloudIdEntity,
|
||||||
companion.copyWith(assetId: Value(metadata.assetId)),
|
companion.copyWith(assetId: Value(metadata.assetId)),
|
||||||
onConflict: DoUpdate((_) => companion),
|
onConflict: DoUpdate((_) => companion),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -301,16 +301,17 @@ class BetaSyncSettings extends HookConsumerWidget {
|
|||||||
ref.read(backgroundSyncProvider).hashAssets();
|
ref.read(backgroundSyncProvider).hashAssets();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
if (Platform.isIOS)
|
||||||
title: Text(
|
ListTile(
|
||||||
"sync_cloud_ids".t(context: context),
|
title: Text(
|
||||||
style: const TextStyle(fontWeight: FontWeight.w500),
|
"sync_cloud_ids".t(context: context),
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
leading: const Icon(Icons.keyboard_command_key_rounded),
|
||||||
|
subtitle: Text("tap_to_run_job".t(context: context)),
|
||||||
|
trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).cloudIdSyncStatus),
|
||||||
|
onTap: ref.read(backgroundSyncProvider).syncCloudIds,
|
||||||
),
|
),
|
||||||
leading: const Icon(Icons.keyboard_command_key_rounded),
|
|
||||||
subtitle: Text("tap_to_run_job".t(context: context)),
|
|
||||||
trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).cloudIdSyncStatus),
|
|
||||||
onTap: ref.read(backgroundSyncProvider).syncCloudIds,
|
|
||||||
),
|
|
||||||
const Divider(height: 1, indent: 16, endIndent: 16),
|
const Divider(height: 1, indent: 16, endIndent: 16),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
_SectionHeaderText(text: "actions".t(context: context)),
|
_SectionHeaderText(text: "actions".t(context: context)),
|
||||||
|
|||||||
Reference in New Issue
Block a user