Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: selected sources changes not being updated correctly (#7897)
Richard Shiue0f89b6f69000
diff --git a/frontend/appflowy_flutter/lib/ai/service/view_selector_cubit.dart b/frontend/appflowy_flutter/lib/ai/service/view_selector_cubit.dartindex 761de75e00..00d0320a06 100644--- a/frontend/appflowy_flutter/lib/ai/service/view_selector_cubit.dart+++ b/frontend/appflowy_flutter/lib/ai/service/view_selector_cubit.dart@@ -81,6 +81,14 @@ class ViewSelectorItem {}}+ void setIsSelectedStatusRecursive(ViewSelectedStatus selectedStatus) {+ selectedStatusNotifier.value = selectedStatus;++ for (final child in children) {+ child.setIsSelectedStatusRecursive(selectedStatus);+ }+ }+void dispose() {for (final child in children) {child.dispose();@@ -312,10 +320,12 @@ class ViewSelectorCubit extends Cubit<ViewSelectorState> {}if (isSelectedSection) {- item.selectedStatusNotifier.value = item.selectedStatus.isUnselected ||- item.selectedStatus.isPartiallySelected- ? ViewSelectedStatus.selected- : ViewSelectedStatus.unselected;+ item.setIsSelectedStatusRecursive(+ item.selectedStatus.isUnselected ||+ item.selectedStatus.isPartiallySelected+ ? ViewSelectedStatus.selected+ : ViewSelectedStatus.unselected,+ );}updateSelectedStatus();