Update myResidences when residence is deleted

DataManager.removeResidence() now also updates _myResidences so the
residence list view updates immediately without requiring a manual refresh.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-08 23:24:22 -06:00
parent 4a04aff1e6
commit ed14a1c69e

View File

@@ -326,6 +326,13 @@ object DataManager {
_tasksByResidence.value = _tasksByResidence.value - residenceId
_documentsByResidence.value = _documentsByResidence.value - residenceId
_residenceSummaries.value = _residenceSummaries.value - residenceId
// Also update myResidences so the list view updates immediately
_myResidences.value?.let { current ->
_myResidences.value = current.copy(
residences = current.residences.filter { it.id != residenceId }
)
}
persistToDisk()
}