π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
code cleanup
ashilkn8e5786c6fb0a
diff --git a/mobile/lib/ui/home/memories/memories_widget.dart b/mobile/lib/ui/home/memories/memories_widget.dartindex 40d0b272f0..52e9dd8a36 100644--- a/mobile/lib/ui/home/memories/memories_widget.dart+++ b/mobile/lib/ui/home/memories/memories_widget.dart@@ -129,8 +129,8 @@ class _MemoriesWidgetState extends State<MemoriesWidget> {return MemoryCoverWidget(memories: collatedMemories[itemIndex].$1,allMemories: collatedMemories.map((e) => e.$1).toList(),- maxHeight: _memoryheight,- maxWidth: _memoryWidth,+ height: _memoryheight,+ width: _memoryWidth,title: collatedMemories[itemIndex].$2,allTitle: collatedMemories.map((e) => e.$2).toList(),currentMemoryIndex: itemIndex,diff --git a/mobile/lib/ui/home/memories/memory_cover_widget.dart b/mobile/lib/ui/home/memories/memory_cover_widget.dartindex d6f8472fbe..073bb3f20d 100644--- a/mobile/lib/ui/home/memories/memory_cover_widget.dart+++ b/mobile/lib/ui/home/memories/memory_cover_widget.dart@@ -13,8 +13,8 @@ import "package:photos/utils/navigation_util.dart";class MemoryCoverWidget extends StatefulWidget {final List<Memory> memories;final List<List<Memory>> allMemories;- final double maxHeight;- final double maxWidth;+ final double height;+ final double width;static const outerStrokeWidth = 1.0;static const aspectRatio = 0.68;static const horizontalPadding = 2.5;@@ -25,8 +25,8 @@ class MemoryCoverWidget extends StatefulWidget {const MemoryCoverWidget({required this.memories,required this.allMemories,- required this.maxHeight,- required this.maxWidth,+ required this.height,+ required this.width,required this.title,required this.allTitle,required this.currentMemoryIndex,@@ -76,146 +76,140 @@ class _MemoryCoverWidgetState extends State<MemoryCoverWidget> {),);setState(() {});- }, //Adding this row is a workaround for making height of memory cover- //render as [MemoryCoverWidgetNew.height] * scale. Without this, height of rendered memory- //cover will be [MemoryCoverWidgetNew.height].- child: Row(- children: [- Container(- height: widget.maxHeight,- width: widget.maxWidth,- decoration: BoxDecoration(- boxShadow: brightness == Brightness.dark- ? [- const BoxShadow(- color: strokeFainterDark,- spreadRadius: MemoryCoverWidget.outerStrokeWidth,- blurRadius: 0,- ),- ]- : [...shadowFloatFaintestLight],- borderRadius: BorderRadius.circular(5),- ),- child: ClipRRect(- borderRadius: BorderRadius.circular(5),- child: isSeen- ? ColorFiltered(- colorFilter: const ColorFilter.mode(- Color(0xFFBFBFBF),- BlendMode.hue,+ },+ child: Container(+ height: widget.height,+ width: widget.width,+ decoration: BoxDecoration(+ boxShadow: brightness == Brightness.dark+ ? [+ const BoxShadow(+ color: strokeFainterDark,+ spreadRadius: MemoryCoverWidget.outerStrokeWidth,+ blurRadius: 0,+ ),+ ]+ : [...shadowFloatFaintestLight],+ borderRadius: BorderRadius.circular(5),+ ),+ child: ClipRRect(+ borderRadius: BorderRadius.circular(5),+ child: isSeen+ ? ColorFiltered(+ colorFilter: const ColorFilter.mode(+ Color(0xFFBFBFBF),+ BlendMode.hue,+ ),+ child: Stack(+ fit: StackFit.expand,+ alignment: Alignment.bottomCenter,+ children: [+ Hero(+ tag: "memories" + memory.file.tag,+ child: ThumbnailWidget(+ memory.file,+ shouldShowArchiveStatus: false,+ shouldShowSyncStatus: false,+ key: Key("memories" + memory.file.tag),+ ),),- child: Stack(- fit: StackFit.expand,- alignment: Alignment.bottomCenter,- children: [- Hero(- tag: "memories" + memory.file.tag,- child: ThumbnailWidget(- memory.file,- shouldShowArchiveStatus: false,- shouldShowSyncStatus: false,- key: Key("memories" + memory.file.tag),- ),+ Container(+ decoration: BoxDecoration(+ gradient: LinearGradient(+ colors: [+ Colors.black.withOpacity(0.5),+ Colors.transparent,+ ],+ stops: const [0, 1],+ begin: Alignment.bottomCenter,+ end: Alignment.topCenter,),- Container(- decoration: BoxDecoration(- gradient: LinearGradient(- colors: [- Colors.black.withOpacity(0.5),- Colors.transparent,- ],- stops: const [0, 1],- begin: Alignment.bottomCenter,- end: Alignment.topCenter,- ),+ ),+ ),+ Positioned(+ bottom: 8,+ child: SizedBox(+ width: widget.width,+ child: Padding(+ padding: const EdgeInsets.symmetric(+ horizontal: 8.0,),- ),- Positioned(- bottom: 8,- child: SizedBox(- width: widget.maxWidth,- child: Padding(- padding: const EdgeInsets.symmetric(- horizontal: 8.0,- ),- child: Hero(- tag: title,- child: Center(- child: Text(- title,- style: getEnteTextTheme(context)- .miniBold- .copyWith(- color: isSeen- ? textFaintDark- : Colors.white,- ),- textAlign: TextAlign.left,- ),- ),+ child: Hero(+ tag: title,+ child: Center(+ child: Text(+ title,+ style: getEnteTextTheme(context)+ .miniBold+ .copyWith(+ color: isSeen+ ? textFaintDark+ : Colors.white,+ ),+ textAlign: TextAlign.left,),),),),- ],+ ),),- )- : Stack(- fit: StackFit.expand,- alignment: Alignment.bottomCenter,- children: [- Hero(- tag: "memories" + memory.file.tag,- child: ThumbnailWidget(- memory.file,- shouldShowArchiveStatus: false,- shouldShowSyncStatus: false,- key: Key("memories" + memory.file.tag),- ),+ ],+ ),+ )+ : Stack(+ fit: StackFit.expand,+ alignment: Alignment.bottomCenter,+ children: [+ Hero(+ tag: "memories" + memory.file.tag,+ child: ThumbnailWidget(+ memory.file,+ shouldShowArchiveStatus: false,+ shouldShowSyncStatus: false,+ key: Key("memories" + memory.file.tag),+ ),+ ),+ Container(+ decoration: BoxDecoration(+ gradient: LinearGradient(+ colors: [+ Colors.black.withOpacity(0.5),+ Colors.transparent,+ ],+ stops: const [0, 1],+ begin: Alignment.bottomCenter,+ end: Alignment.topCenter,),- Container(- decoration: BoxDecoration(- gradient: LinearGradient(- colors: [- Colors.black.withOpacity(0.5),- Colors.transparent,- ],- stops: const [0, 1],- begin: Alignment.bottomCenter,- end: Alignment.topCenter,- ),+ ),+ ),+ Positioned(+ bottom: 8,+ child: SizedBox(+ width: widget.width,+ child: Padding(+ padding: const EdgeInsets.symmetric(+ horizontal: 8.0,),- ),- Positioned(- bottom: 8,- child: SizedBox(- width: widget.maxWidth,- child: Padding(- padding: const EdgeInsets.symmetric(- horizontal: 8.0,- ),- child: Hero(- tag: title,- child: Center(- child: Text(- title,- style: getEnteTextTheme(context)- .miniBold- .copyWith(- color: Colors.white,- ),- textAlign: TextAlign.left,- ),- ),+ child: Hero(+ tag: title,+ child: Center(+ child: Text(+ title,+ style: getEnteTextTheme(context)+ .miniBold+ .copyWith(+ color: Colors.white,+ ),+ textAlign: TextAlign.left,),),),),- ],+ ),),- ),- ),- ],+ ],+ ),+ ),),),);