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:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user