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: do not rebuild hover on item selection (#3423)
Mathias Mogensenb700f95c7f82
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dartindex ef1d157932..fd3e84c167 100644--- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart+++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart@@ -249,21 +249,23 @@ class SingleInnerViewItem extends StatefulWidget {}class _SingleInnerViewItemState extends State<SingleInnerViewItem> {+ bool _isHovering = false;+@overrideWidget build(BuildContext context) {if (widget.isFeedback) {return _buildViewItem(false);}- return FlowyHover(- style: HoverStyle(- hoverColor: Theme.of(context).colorScheme.secondary,+ return MouseRegion(+ onEnter: (_) => setState(() => _isHovering = true),+ onExit: (_) => setState(() => _isHovering = false),+ child: FlowyHover(+ isSelected: () =>+ widget.showActions ||+ getIt<MenuSharedState>().latestOpenView?.id == widget.view.id,+ child: _buildViewItem(_isHovering),),- buildWhenOnHover: () => !widget.showActions,- builder: (_, onHover) => _buildViewItem(onHover),- isSelected: () =>- widget.showActions ||- getIt<MenuSharedState>().latestOpenView?.id == widget.view.id,);}