revert: changes...

This commit is contained in:
idubnori
2025-12-15 00:27:40 +09:00
parent 9262f69519
commit 85086cdb02
6 changed files with 0 additions and 49 deletions

View File

@@ -2022,7 +2022,6 @@
"theme": "テーマ",
"theme_selection": "テーマ選択",
"theme_selection_description": "ブラウザのシステム設定に基づいてテーマを明色または暗色に自動的に設定します",
"theme_setting_asset_list_show_owner_name_title": "アセット所有者名を表示",
"theme_setting_asset_list_storage_indicator_title": "ストレージに関する情報を表示",
"theme_setting_asset_list_tiles_per_row_title": "一行ごとの表示枚数: {count}",
"theme_setting_colorful_interface_subtitle": "アクセントカラーを背景にも使用する",

View File

@@ -169,10 +169,6 @@ class Asset {
@Enumerated(EnumType.ordinal)
AssetVisibilityEnum visibility;
/// Transient field for storing owner name (used in shared albums)
@ignore
String? ownerName;
/// Returns null if the asset has no sync access to the exif info
@ignore
double? get aspectRatio {

View File

@@ -104,7 +104,6 @@ class AlbumViewer extends HookConsumerWidget {
MultiselectGrid(
key: const ValueKey("albumViewerMultiselectGrid"),
renderListProvider: albumTimelineProvider(album.id),
album: album,
topWidget: Container(
decoration: BoxDecoration(
gradient: LinearGradient(

View File

@@ -11,7 +11,6 @@ import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart'
import 'package:immich_mobile/widgets/asset_grid/immich_asset_grid_view.dart';
import 'package:immich_mobile/providers/app_settings.provider.dart';
import 'package:immich_mobile/services/app_settings.service.dart';
import 'package:immich_mobile/entities/album.entity.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
@@ -34,7 +33,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
final bool showDragScroll;
final bool showDragScrollLabel;
final bool showStack;
final Album? album;
const ImmichAssetGrid({
super.key,
@@ -56,7 +54,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
this.showDragScroll = true,
this.showDragScrollLabel = true,
this.showStack = false,
this.album,
});
@override
@@ -118,7 +115,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
showDragScroll: showDragScroll,
showStack: showStack,
showLabel: showDragScrollLabel,
album: album,
),
);
}

View File

@@ -10,9 +10,7 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/entities/album.entity.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
import 'package:immich_mobile/utils/hash.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/extensions/collection_extensions.dart';
import 'package:immich_mobile/extensions/theme_extensions.dart';
@@ -57,7 +55,6 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
final bool showDragScroll;
final bool showStack;
final bool showLabel;
final Album? album;
const ImmichAssetGridView({
super.key,
@@ -79,7 +76,6 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
this.showDragScroll = true,
this.showStack = false,
this.showLabel = true,
this.album,
});
@override
@@ -157,32 +153,6 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
return widget.selectionActive && assets.firstWhereOrNull((e) => !_selectedAssets.contains(e)) == null;
}
String? _getOwnerName(Asset asset) {
final album = widget.album;
if (album == null || !album.shared) {
return null;
}
// Load owner and sharedUsers if not loaded
album.owner.loadSync();
album.sharedUsers.loadSync();
// Check if asset owner matches album owner
final owner = album.owner.value;
if (owner != null && asset.ownerId == fastHash(owner.id)) {
return owner.name;
}
// Check shared users
for (final user in album.sharedUsers) {
if (asset.ownerId == fastHash(user.id)) {
return user.name;
}
}
return null;
}
Future<void> _scrollToIndex(int index) async {
// if the index is so far down, that the end of the list is reached on the screen
// the scroll_position widget crashes. This is a workaround to prevent this.
@@ -227,7 +197,6 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
ref.read(showControlsProvider.notifier).show = false;
}
},
getOwnerName: _getOwnerName,
);
}
@@ -611,7 +580,6 @@ class _Section extends StatelessWidget {
final int heroOffset;
final bool showStorageIndicator;
final void Function(Asset) onAssetTap;
final String? Function(Asset)? getOwnerName;
const _Section({
required this.section,
@@ -630,7 +598,6 @@ class _Section extends StatelessWidget {
required this.heroOffset,
required this.showStorageIndicator,
required this.onAssetTap,
this.getOwnerName,
});
@override
@@ -684,7 +651,6 @@ class _Section extends StatelessWidget {
onSelect: (asset) => selectAssets([asset]),
onDeselect: (asset) => deselectAssets([asset]),
onAssetTap: onAssetTap,
getOwnerName: getOwnerName,
),
],
);
@@ -764,7 +730,6 @@ class _AssetRow extends StatelessWidget {
final void Function(Asset)? onSelect;
final void Function(Asset)? onDeselect;
final bool isSelectionActive;
final String? Function(Asset)? getOwnerName;
const _AssetRow({
super.key,
@@ -786,7 +751,6 @@ class _AssetRow extends StatelessWidget {
required this.onAssetTap,
this.onSelect,
this.onDeselect,
this.getOwnerName,
});
@override

View File

@@ -48,7 +48,6 @@ class MultiselectGrid extends HookConsumerWidget {
this.unfavorite = false,
this.downloadEnabled = true,
this.emptyIndicator,
this.album,
});
final ProviderListenable<AsyncValue<RenderList>> renderListProvider;
@@ -66,7 +65,6 @@ class MultiselectGrid extends HookConsumerWidget {
final bool unfavorite;
final bool editEnabled;
final Widget? emptyIndicator;
final Album? album;
Widget buildDefaultLoadingIndicator() => const Center(child: CircularProgressIndicator());
Widget buildEmptyIndicator() => emptyIndicator ?? Center(child: const Text("no_assets_to_show").tr());
@@ -420,7 +418,6 @@ class MultiselectGrid extends HookConsumerWidget {
topWidget: topWidget,
showStack: stackEnabled,
showDragScrollLabel: dragScrollLabelEnabled,
album: album,
),
error: (error, _) => Center(child: Text(error.toString())),
loading: buildLoadingIndicator ?? buildDefaultLoadingIndicator,