mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: auto expand again after reorder app
This commit is contained in:
parent
ecd2dc3e72
commit
0285b286a6
@ -11,7 +11,7 @@ import 'section/section.dart';
|
||||
|
||||
class MenuApp extends StatefulWidget {
|
||||
final App app;
|
||||
MenuApp(this.app, {Key? key}) : super(key: ValueKey(app.hashCode));
|
||||
const MenuApp(this.app, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MenuApp> createState() => _MenuAppState();
|
||||
@ -95,6 +95,11 @@ class _MenuAppState extends State<MenuApp> {
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant MenuApp oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
viewDataContext.dispose();
|
||||
|
@ -108,7 +108,7 @@ class HomeMenu extends StatelessWidget {
|
||||
child: ScrollConfiguration(
|
||||
behavior: const ScrollBehavior().copyWith(scrollbars: false),
|
||||
child: BlocSelector<MenuBloc, MenuState, List<Widget>>(
|
||||
selector: (state) => state.apps.map((app) => MenuApp(app)).toList(),
|
||||
selector: (state) => state.apps.map((app) => MenuApp(app, key: ValueKey(app.id))).toList(),
|
||||
builder: (context, menuItems) {
|
||||
return ReorderableListView.builder(
|
||||
itemCount: menuItems.length,
|
||||
@ -128,7 +128,7 @@ class HomeMenu extends StatelessWidget {
|
||||
physics: StyledScrollPhysics(),
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ReorderableDragStartListener(
|
||||
key: ValueKey(menuItems[index].hashCode),
|
||||
key: ValueKey(menuItems[index].key),
|
||||
index: index,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: MenuAppSizes.appVPadding / 2),
|
||||
|
Loading…
Reference in New Issue
Block a user