From 6ea613c7b4f4306895309ddbc268d0182e798d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20Korkmazt=C3=BCrk?= Date: Sat, 5 Sep 2026 07:34:03 -0400 Subject: [PATCH] Fix property deletion corrupting the in-flight property list deleteProperty rebuilt mrgfpIn by adding the property being deleted (fp) for every retained entry (fp2), so after a successful server-side delete the array held copies of the deleted property and none of the retained ones. The visible list and exit-time persistence use mRgfpall, so the corruption stayed hidden until a later reset-to-default: deleteDefaultedProperty scans mrgfpIn, and after the first reset in a session it found no existing record for subsequent properties, never telling the server to delete them. Their resets appeared to take effect locally, then reverted on the next load or sync. Add the retained entry (fp2) instead of the deleted one. --- .../main/java/com/myflightbook/android/ActViewProperties.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/myflightbook/android/ActViewProperties.kt b/app/src/main/java/com/myflightbook/android/ActViewProperties.kt index 1cc7ff2..272c930 100644 --- a/app/src/main/java/com/myflightbook/android/ActViewProperties.kt +++ b/app/src/main/java/com/myflightbook/android/ActViewProperties.kt @@ -1,7 +1,7 @@ /* MyFlightbook for Android - provides native access to MyFlightbook pilot's logbook - Copyright (C) 2017-2025 MyFlightbook, LLC + Copyright (C) 2017-2026 MyFlightbook, LLC This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ class ActViewProperties : FixedExpandableListActivity(), PropertyEdit.PropertyLi { s-> s.deletePropertyForFlight(AuthToken.m_szAuthToken, idExisting, fp.idProp, act) }, { _, _ -> val alNew = ArrayList() - for (fp2 in mrgfpIn) if (fp2.idProp != fp.idProp) alNew.add(fp) + for (fp2 in mrgfpIn) if (fp2.idProp != fp.idProp) alNew.add(fp2) mrgfpIn = alNew.toTypedArray() } )