mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: sync the icon & title (#4150)
* feat: sync the icon & title * feat: diff the view data when refreshing * fix: unable to update folder * test: refactor bloc tests
This commit is contained in:
@ -45,7 +45,7 @@ class MobilePersonalFolder extends StatelessWidget {
|
||||
...views.map(
|
||||
(view) => MobileViewItem(
|
||||
key: ValueKey(
|
||||
'${FolderCategoryType.personal.name} ${view.hashCode} ',
|
||||
'${FolderCategoryType.personal.name} ${view.id}',
|
||||
),
|
||||
isDraggable: true,
|
||||
categoryType: FolderCategoryType.personal,
|
||||
|
@ -76,14 +76,10 @@ class MobileViewItem extends StatelessWidget {
|
||||
p.lastCreatedView?.id != c.lastCreatedView!.id,
|
||||
listener: (context, state) => context.pushView(state.lastCreatedView!),
|
||||
builder: (context, state) {
|
||||
// don't remove this code. it's related to the backend service.
|
||||
view.childViews
|
||||
..clear()
|
||||
..addAll(state.childViews);
|
||||
return InnerMobileViewItem(
|
||||
view: state.view,
|
||||
parentView: parentView,
|
||||
childViews: state.childViews,
|
||||
childViews: state.view.childViews,
|
||||
categoryType: categoryType,
|
||||
level: level,
|
||||
leftPadding: leftPadding,
|
||||
@ -163,7 +159,7 @@ class InnerMobileViewItem extends StatelessWidget {
|
||||
if (childViews.isNotEmpty) {
|
||||
final children = childViews.map((childView) {
|
||||
return MobileViewItem(
|
||||
key: ValueKey('${categoryType.name} ${childView.hashCode}'),
|
||||
key: ValueKey('${categoryType.name} ${childView.id}'),
|
||||
parentView: view,
|
||||
categoryType: categoryType,
|
||||
isFirstChild: childView.id == childViews.first.id,
|
||||
|
Reference in New Issue
Block a user