Launcher: preserve legacy address fields in IDB; add file_sync to loop_info
ae_events__event.ts: Add legacy flat address fields (address_name, address_line_1, address_city, etc.) to properties_to_save. Events predating location_address_json still return these flat fields from the API; they must survive an IDB round-trip without being stripped by _process_generic_props, or the edit form's fallback reads return undefined. launcher_background_sync.svelte: - Move file_sync interval into loop_info $state alongside other intervals; load from cfg/device config with fallback (30 s). Keeps all intervals in one place for UI display consistency. - Align onMount fallback values to match loop_info defaults. - Add sync_paused mid-loop break: long sync cycles now honour a pause request per-iteration rather than waiting for the entire batch.
This commit is contained in:
@@ -797,7 +797,7 @@ export async function qry_ae_obj_li__event_v2({
|
||||
return filtered_obj_li.slice(0, limit);
|
||||
}
|
||||
|
||||
// Updated 2025-05-09
|
||||
// Updated 2026-03-10
|
||||
export const properties_to_save = [
|
||||
'id',
|
||||
'event_id',
|
||||
@@ -858,7 +858,23 @@ export const properties_to_save = [
|
||||
'file_count',
|
||||
'file_count_all',
|
||||
'internal_use_count',
|
||||
'event_file_id_li_json'
|
||||
'event_file_id_li_json',
|
||||
// Legacy flat address fields — preserved so background SWR re-fires do not wipe
|
||||
// address data for events that predate location_address_json. The edit form reads
|
||||
// these as a fallback: location_address_json?.name ?? address_name ?? ''.
|
||||
// New saves always write structured data into location_address_json, but the API
|
||||
// may still return the flat fields for older records and they must survive an IDB
|
||||
// round-trip without being stripped by _process_generic_props.
|
||||
'address_location_id',
|
||||
'address_name',
|
||||
'address_line_1',
|
||||
'address_line_2',
|
||||
'address_city',
|
||||
'address_state',
|
||||
'address_postal_code',
|
||||
'address_country',
|
||||
'address_country_alpha_2_code',
|
||||
'address_country_subdivision_code'
|
||||
];
|
||||
|
||||
async function _process_generic_props<T extends Record<string, any>>({
|
||||
|
||||
Reference in New Issue
Block a user