fix Android first-showing screen

This commit is contained in:
Adam Velebil 2024-03-14 15:33:18 +01:00
parent 053581501d
commit 591352d482
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10
2 changed files with 9 additions and 13 deletions

View File

@ -97,15 +97,14 @@ class MainPage extends ConsumerWidget {
icon: const Icon(Symbols.contactless),
onPressed: () async {
await openNfcSettings();
})
}),
ElevatedButton.icon(
label: Text(l10n.s_add_account),
icon: const Icon(Symbols.person_add_alt),
onPressed: () async {
await addOathAccount(context, ref);
})
],
actionButtonBuilder: (context) => IconButton(
icon: const Icon(Symbols.person_add_alt),
tooltip: l10n.s_add_account,
onPressed: () async {
await addOathAccount(context, ref);
},
),
);
} else {
return HomeMessagePage(

View File

@ -21,7 +21,6 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../app/views/message_page.dart';
import '../../core/state.dart';
import '../../management/models.dart';
import 'key_actions.dart';
@ -60,15 +59,13 @@ class HomeMessagePage extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final l10n = AppLocalizations.of(context)!;
// TODO: Remove Android check when Home is implemented on Android
return MessagePage(
title: !isAndroid ? l10n.s_home : null,
title: l10n.s_home,
graphic: graphic,
header: header,
message: message,
footnote: footnote,
keyActionsBuilder:
!isAndroid ? (context) => homeBuildActions(context, null, ref) : null,
keyActionsBuilder: (context) => homeBuildActions(context, null, ref),
actionButtonBuilder: actionButtonBuilder,
actionsBuilder: actionsBuilder,
fileDropOverlay: fileDropOverlay,