Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Remove unused file type fallback asset

ashilknfd5fc965c617
diff --git a/mobile/apps/photos/assets/type_unknown.png b/mobile/apps/photos/assets/type_unknown.png
deleted file mode 100644
index 3de6444a20..0000000000
Binary files a/mobile/apps/photos/assets/type_unknown.png and /dev/null differ
diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart
index 2e46cfff29..6c9c544570 100644
--- a/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart
@@ -194,16 +194,14 @@ class _FileTypeRecommendationState extends State<_FileTypeRecommendation> {
@override
Widget build(BuildContext context) {
final fileTypeKey = widget.tile.assetKey;
- final assetPath = knownTypesToAssetPath[fileTypeKey];
+ final assetPath = knownTypesToAssetPath[fileTypeKey]!;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: ConstrainedBox(
constraints: const BoxConstraints(maxHeight: 68),
child: GestureDetector(
onTap: _onTap,
- child: assetPath != null
- ? Image.asset(assetPath)
- : _UnknownFileTypeImage(fileTypeKey),
+ child: Image.asset(assetPath),
),
),
);
@@ -227,41 +225,3 @@ class _FileTypeRecommendationState extends State<_FileTypeRecommendation> {
}
}
}
-
-class _UnknownFileTypeImage extends StatelessWidget {
- final String fileTypeKey;
-
- const _UnknownFileTypeImage(this.fileTypeKey);
-
- @override
- Widget build(BuildContext context) {
- return Stack(
- alignment: Alignment.center,
- children: [
- Image.asset(
- "assets/type_unknown.png",
- ),
- Positioned(
- bottom: 18,
- child: ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 48),
- child: FittedBox(
- fit: BoxFit.scaleDown,
- child: Text(
- fileTypeKey,
- style: const TextStyle(
- fontSize: 14,
- fontFamily: "Inter",
- color: Colors.white,
- letterSpacing: 0.75,
- ),
- textAlign: TextAlign.center,
- maxLines: 1,
- ),
- ),
- ),
- ),
- ],
- );
- }
-}