[mob] Add groupType in Gallery context state

This commit is contained in:
Neeraj Gupta 2024-05-04 12:00:16 +05:30
parent cc74e08155
commit da329c498c

View file

@ -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;
}
}