π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix changelog dialog layout
Prateek Sunal5943b00ccc92
diff --git a/mobile/apps/photos/lib/services/update_service.dart b/mobile/apps/photos/lib/services/update_service.dartindex 89fbb72c71..149c9866f3 100644--- a/mobile/apps/photos/lib/services/update_service.dart+++ b/mobile/apps/photos/lib/services/update_service.dart@@ -1,6 +1,5 @@import 'dart:io';-import 'package:flutter/foundation.dart';import 'package:logging/logging.dart';import 'package:package_info_plus/package_info_plus.dart';import 'package:photos/core/constants.dart';@@ -15,7 +14,6 @@ class UpdateService {static const kUpdateAvailableShownTimeKey = "update_available_shown_time_key";static const changeLogVersionKey = "update_change_log_key";static const currentChangeLogVersion = 39;-LatestVersionInfo? _latestVersion;final _logger = Logger("UpdateService");final PackageInfo _packageInfo;diff --git a/mobile/apps/photos/lib/ui/notification/update/change_log_page.dart b/mobile/apps/photos/lib/ui/notification/update/change_log_page.dartindex 3ed89a19f5..04b20cfa90 100644--- a/mobile/apps/photos/lib/ui/notification/update/change_log_page.dart+++ b/mobile/apps/photos/lib/ui/notification/update/change_log_page.dart@@ -22,42 +22,43 @@ class _ChangeLogPageState extends State<ChangeLogPage> {@overrideWidget build(BuildContext context) {final enteColorScheme = getEnteColorScheme(context);- return Scaffold(- appBar: null,- body: Container(- color: enteColorScheme.backgroundElevated,+ return Material(+ color: enteColorScheme.backgroundElevated,+ child: SafeArea(+ top: false,child: Column(- mainAxisAlignment: MainAxisAlignment.center,+ mainAxisSize: MainAxisSize.min,children: [- const SizedBox(- height: 36,- ),- Container(- alignment: Alignment.centerLeft,- child: Padding(- padding: const EdgeInsets.symmetric(horizontal: 16.0),+ const SizedBox(height: 36),+ Padding(+ padding: const EdgeInsets.symmetric(horizontal: 16),+ child: Align(+ alignment: Alignment.centerLeft,child: TitleBarTitleWidget(title: AppLocalizations.of(context).whatsNew,),),),- const SizedBox(- height: 24,+ const SizedBox(height: 24),+ Padding(+ padding: const EdgeInsets.only(left: 16),+ child: _getChangeLog(context),),- Expanded(child: _getChangeLog(context)),const DividerWidget(dividerType: DividerType.solid,),SafeArea(+ top: false,child: Padding(padding: const EdgeInsets.only(- left: 16.0,+ left: 16,right: 16,top: 16,bottom: 8,),child: Column(crossAxisAlignment: CrossAxisAlignment.start,+ mainAxisSize: MainAxisSize.min,children: [ButtonWidget(buttonType: ButtonType.trailingIconPrimary,@@ -71,9 +72,7 @@ class _ChangeLogPageState extends State<ChangeLogPage> {}},),- const SizedBox(- height: 8,- ),+ const SizedBox(height: 8),ButtonWidget(buttonType: ButtonType.trailingIconSecondary,buttonSize: ButtonSize.large,@@ -85,7 +84,6 @@ class _ChangeLogPageState extends State<ChangeLogPage> {},),const SizedBox(height: 8),- const SizedBox(height: 8),],),),@@ -98,8 +96,7 @@ class _ChangeLogPageState extends State<ChangeLogPage> {Widget _getChangeLog(BuildContext ctx) {final scrollController = ScrollController();- final List<ChangeLogEntry> items = [];- items.addAll([+ final List<ChangeLogEntry> items = [ChangeLogEntry(context.l10n.cLTitle1,context.l10n.cLDesc1,@@ -110,23 +107,30 @@ class _ChangeLogPageState extends State<ChangeLogPage> {context.l10n.cLDesc2,isFeature: true,),- ]);- return Container(- padding: const EdgeInsets.only(left: 16),+ ];+ final double maxListHeight = MediaQuery.of(ctx).size.height * 0.5;+ final bool shouldScroll = items.length > 3;+ final listView = ListView.builder(+ controller: scrollController,+ shrinkWrap: true,+ padding: const EdgeInsets.only(right: 16),+ physics: shouldScroll+ ? const BouncingScrollPhysics()+ : const NeverScrollableScrollPhysics(),+ itemBuilder: (context, index) {+ return ChangeLogEntryWidget(entry: items[index]);+ },+ itemCount: items.length,+ );+ return ConstrainedBox(+ constraints: BoxConstraints(+ maxHeight: maxListHeight,+ ),child: Scrollbar(controller: scrollController,- thumbVisibility: true,+ thumbVisibility: shouldScroll,thickness: 2.0,- child: ListView.builder(- physics: const BouncingScrollPhysics(),- itemBuilder: (context, index) {- return Padding(- padding: const EdgeInsets.only(right: 16.0),- child: ChangeLogEntryWidget(entry: items[index]),- );- },- itemCount: items.length,- ),+ child: listView,),);}