Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Added animation

Aman Raj Singh Mourya2af07d9211ee
diff --git a/mobile/lib/ui/tabs/shared/all_quick_links_page.dart b/mobile/lib/ui/tabs/shared/all_quick_links_page.dart
index 0303ae59e5..c489621a99 100644
--- a/mobile/lib/ui/tabs/shared/all_quick_links_page.dart
+++ b/mobile/lib/ui/tabs/shared/all_quick_links_page.dart
@@ -58,7 +58,7 @@ class _AllQuickLinksPageState extends State<AllQuickLinksPage> {
});
}
- Future<bool> _removeQuickLink() async {
+ Future<bool> _removeQuickLinks() async {
if (selectedQuickLinks.isEmpty) {
await showErrorDialog(
context,
@@ -131,7 +131,7 @@ class _AllQuickLinksPageState extends State<AllQuickLinksPage> {
actions: [
IconButton(
onPressed: () async {
- await _removeQuickLink();
+ await _removeQuickLinks();
},
icon: Icon(
Icons.remove_circle_outline_outlined,
diff --git a/mobile/lib/ui/tabs/shared/quick_link_album_item.dart b/mobile/lib/ui/tabs/shared/quick_link_album_item.dart
index fac2fb80f4..5f234cce54 100644
--- a/mobile/lib/ui/tabs/shared/quick_link_album_item.dart
+++ b/mobile/lib/ui/tabs/shared/quick_link_album_item.dart
@@ -22,14 +22,16 @@ class QuickLinkAlbumItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ final bool isSelected = selectedQuickLinks.contains(c);
final colorScheme = getEnteColorScheme(context);
final textTheme = getEnteTextTheme(context);
- return Container(
+ return AnimatedContainer(
+ curve: Curves.easeOut,
+ duration: const Duration(milliseconds: 200),
decoration: BoxDecoration(
border: Border.all(
- color: selectedQuickLinks.contains(c)
- ? colorScheme.strokeMuted
- : colorScheme.strokeFainter,
+ color:
+ isSelected ? colorScheme.strokeMuted : colorScheme.strokeFainter,
),
borderRadius: const BorderRadius.all(
Radius.circular(2),
@@ -137,16 +139,18 @@ class QuickLinkAlbumItem extends StatelessWidget {
Flexible(
flex: 1,
child: AnimatedSwitcher(
- duration: const Duration(milliseconds: 210),
+ duration: const Duration(milliseconds: 200),
switchInCurve: Curves.easeOut,
switchOutCurve: Curves.easeIn,
- child: selectedQuickLinks.contains(c)
+ child: isSelected
? IconButtonWidget(
+ key: ValueKey(isSelected),
icon: Icons.check_circle_rounded,
iconButtonType: IconButtonType.secondary,
iconColor: colorScheme.blurStrokeBase,
)
- : const IconButtonWidget(
+ : IconButtonWidget(
+ key: ValueKey(isSelected),
icon: Icons.chevron_right_outlined,
iconButtonType: IconButtonType.secondary,
),