fix: filter chat page when duplicating (#5676)

* fix: filter chat page when duplicating

* fix: don't clear selection if it has been disposed
This commit is contained in:
Lucas.Xu 2024-07-02 14:35:29 +08:00 committed by GitHub
parent 7a3f013a87
commit 6d0c9f766b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View File

@ -1,7 +1,13 @@
# Release Notes
## Version 0.6.2 - 01/07/2024
### New Features
- Added support for duplicating spaces.
- Added support for moving pages across spaces.
- Undo markdown formatting with `Ctrl + Z` or `Cmd + Z`.
- Improved shortcuts settings UI.
### Bug Fixes
- Fixed unable to zoom in with `Ctrl` and `+` or `Cmd` and `+` on some keyboards.
- Fixed unable to paste nested lists in existing lists.
## Version 0.6.1 - 22/06/2024
### New Features

View File

@ -214,7 +214,11 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
AFFocusManager? focusManager;
void _loseFocus() => widget.editorState.selection = null;
void _loseFocus() {
if (!widget.editorState.isDisposed) {
widget.editorState.selection = null;
}
}
@override
void initState() {

View File

@ -885,7 +885,7 @@ impl FolderManager {
// reverse the child views to keep the order
for child_view in child_views.iter().rev() {
// skip the view_id should be filtered and the child_view is the duplicated view
if !filtered_view_ids.contains(&child_view.id) {
if !filtered_view_ids.contains(&child_view.id) && child_view.layout != ViewLayout::Chat {
stack.push((child_view.id.clone(), duplicated_view.id.clone()));
}
}