mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	* use mutex * feat: cool app bar * animation * adapt to more pages * animation * better animation * fix: asset count * Revert "fix: asset count" This reverts commit 673a5b264be0ae851aa63a28ecc316c27cfc412b. * fix: asset count * fix: shaky animation on Android * tunning * offset SizedBox to fix scroll jump on multiselect --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:auto_route/auto_route.dart';
 | 
						|
import 'package:flutter/material.dart';
 | 
						|
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
						|
import 'package:immich_mobile/extensions/translate_extensions.dart';
 | 
						|
import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart';
 | 
						|
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
 | 
						|
import 'package:immich_mobile/providers/user.provider.dart';
 | 
						|
import 'package:immich_mobile/widgets/common/mesmerizing_sliver_app_bar.dart';
 | 
						|
 | 
						|
@RoutePage()
 | 
						|
class DriftArchivePage extends StatelessWidget {
 | 
						|
  const DriftArchivePage({super.key});
 | 
						|
 | 
						|
  @override
 | 
						|
  Widget build(BuildContext context) {
 | 
						|
    return ProviderScope(
 | 
						|
      overrides: [
 | 
						|
        timelineServiceProvider.overrideWith(
 | 
						|
          (ref) {
 | 
						|
            final user = ref.watch(currentUserProvider);
 | 
						|
            if (user == null) {
 | 
						|
              throw Exception('User must be logged in to access archive');
 | 
						|
            }
 | 
						|
 | 
						|
            final timelineService =
 | 
						|
                ref.watch(timelineFactoryProvider).archive(user.id);
 | 
						|
            ref.onDispose(timelineService.dispose);
 | 
						|
            return timelineService;
 | 
						|
          },
 | 
						|
        ),
 | 
						|
      ],
 | 
						|
      child: Timeline(
 | 
						|
        appBar: MesmerizingSliverAppBar(
 | 
						|
          title: 'archive'.t(context: context),
 | 
						|
          icon: Icons.archive_outlined,
 | 
						|
        ),
 | 
						|
      ),
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 |