mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
Remove unnecessary changes and follow conventions
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
@@ -8,10 +10,9 @@ import 'package:immich_mobile/extensions/duration_extensions.dart';
|
|||||||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||||
import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart';
|
import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart';
|
||||||
import 'package:immich_mobile/presentation/widgets/timeline/constants.dart';
|
import 'package:immich_mobile/presentation/widgets/timeline/constants.dart';
|
||||||
|
import 'package:immich_mobile/providers/infrastructure/asset_viewer/current_asset.provider.dart';
|
||||||
import 'package:immich_mobile/providers/infrastructure/setting.provider.dart';
|
import 'package:immich_mobile/providers/infrastructure/setting.provider.dart';
|
||||||
import 'package:immich_mobile/providers/timeline/multiselect.provider.dart';
|
import 'package:immich_mobile/providers/timeline/multiselect.provider.dart';
|
||||||
import 'package:immich_mobile/providers/infrastructure/asset_viewer/current_asset.provider.dart';
|
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
class _DelayedAnimation extends StatefulWidget {
|
class _DelayedAnimation extends StatefulWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|||||||
@@ -13,20 +13,12 @@ import 'package:octo_image/octo_image.dart';
|
|||||||
import 'package:immich_mobile/providers/user.provider.dart';
|
import 'package:immich_mobile/providers/user.provider.dart';
|
||||||
|
|
||||||
class ImmichThumbnail extends HookConsumerWidget {
|
class ImmichThumbnail extends HookConsumerWidget {
|
||||||
const ImmichThumbnail({
|
const ImmichThumbnail({this.asset, this.width = 250, this.height = 250, this.fit = BoxFit.cover, super.key});
|
||||||
this.asset,
|
|
||||||
this.width = 250,
|
|
||||||
this.height = 250,
|
|
||||||
this.fit = BoxFit.cover,
|
|
||||||
super.key,
|
|
||||||
this.placeholderEnabled = true,
|
|
||||||
});
|
|
||||||
|
|
||||||
final Asset? asset;
|
final Asset? asset;
|
||||||
final double width;
|
final double width;
|
||||||
final double height;
|
final double height;
|
||||||
final BoxFit fit;
|
final BoxFit fit;
|
||||||
final bool placeholderEnabled;
|
|
||||||
|
|
||||||
/// Helper function to return the image provider for the asset thumbnail
|
/// Helper function to return the image provider for the asset thumbnail
|
||||||
/// either by using the asset ID or the asset itself
|
/// either by using the asset ID or the asset itself
|
||||||
@@ -55,7 +47,7 @@ class ImmichThumbnail extends HookConsumerWidget {
|
|||||||
|
|
||||||
if (asset == null) {
|
if (asset == null) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.black,
|
color: Colors.grey,
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
child: const Center(child: Icon(Icons.no_photography)),
|
child: const Center(child: Icon(Icons.no_photography)),
|
||||||
|
|||||||
Reference in New Issue
Block a user