[mob] Add groupType in Gallery context state
This commit is contained in:
parent
cc74e08155
commit
da329c498c
|
@ -1,12 +1,15 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:photos/ui/viewer/gallery/component/group/type.dart";
|
||||
|
||||
class GalleryContextState extends InheritedWidget {
|
||||
///Sorting by creation time
|
||||
final bool sortOrderAsc;
|
||||
final bool inSelectionMode;
|
||||
final GroupType type;
|
||||
|
||||
const GalleryContextState({
|
||||
this.inSelectionMode = false,
|
||||
this.type = GroupType.day,
|
||||
required this.sortOrderAsc,
|
||||
required Widget child,
|
||||
Key? key,
|
||||
|
@ -19,6 +22,7 @@ class GalleryContextState extends InheritedWidget {
|
|||
@override
|
||||
bool updateShouldNotify(GalleryContextState oldWidget) {
|
||||
return sortOrderAsc != oldWidget.sortOrderAsc ||
|
||||
inSelectionMode != oldWidget.inSelectionMode;
|
||||
inSelectionMode != oldWidget.inSelectionMode ||
|
||||
type != oldWidget.type;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue