Skip to content

High performance self-hosted photo and video management solution.

fix: respect storage indicator setting (#22596)

shenlong2e16a88f386a
diff --git a/mobile/lib/pages/common/settings.page.dart b/mobile/lib/pages/common/settings.page.dart
index b23c420971..0fe2ccec09 100644
--- a/mobile/lib/pages/common/settings.page.dart
+++ b/mobile/lib/pages/common/settings.page.dart
@@ -141,14 +141,9 @@ class SettingsSubPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
context.locale;
- return SafeArea(
- bottom: true,
- top: false,
- right: true,
- child: Scaffold(
- appBar: AppBar(centerTitle: false, title: Text(section.title).tr()),
- body: section.widget,
- ),
+ return Scaffold(
+ appBar: AppBar(centerTitle: false, title: Text(section.title).tr()),
+ body: section.widget,
);
}
}
diff --git a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart
index a0163a7220..5359391261 100644
--- a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart
+++ b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart
@@ -16,7 +16,7 @@ class ThumbnailTile extends ConsumerWidget {
this.asset, {
this.size = kThumbnailResolution,
this.fit = BoxFit.cover,
- this.showStorageIndicator,
+ this.showStorageIndicator = false,
this.lockSelection = false,
this.heroOffset,
super.key,
@@ -25,7 +25,7 @@ class ThumbnailTile extends ConsumerWidget {
final BaseAsset? asset;
final Size size;
final BoxFit fit;
- final bool? showStorageIndicator;
+ final bool showStorageIndicator;
final bool lockSelection;
final int? heroOffset;
@@ -55,7 +55,7 @@ class ThumbnailTile extends ConsumerWidget {
: const BoxDecoration();
final bool storageIndicator =
- showStorageIndicator ?? ref.watch(settingsProvider.select((s) => s.get(Setting.showStorageIndicator)));
+ ref.watch(settingsProvider.select((s) => s.get(Setting.showStorageIndicator))) && showStorageIndicator;
return Stack(
children: [
diff --git a/mobile/lib/presentation/widgets/timeline/timeline.state.dart b/mobile/lib/presentation/widgets/timeline/timeline.state.dart
index b3aec23f7f..1e1d4130f7 100644
--- a/mobile/lib/presentation/widgets/timeline/timeline.state.dart
+++ b/mobile/lib/presentation/widgets/timeline/timeline.state.dart
@@ -14,7 +14,7 @@ class TimelineArgs {
final double maxHeight;
final double spacing;
final int columnCount;
- final bool? showStorageIndicator;
+ final bool showStorageIndicator;
final bool withStack;
final GroupAssetsBy? groupBy;
@@ -23,7 +23,7 @@ class TimelineArgs {
required this.maxHeight,
this.spacing = kTimelineSpacing,
this.columnCount = kTimelineColumnCount,
- this.showStorageIndicator,
+ this.showStorageIndicator = false,
this.withStack = false,
this.groupBy,
});