Show notifications settings screen on ios (#688)
* feat: show notifications settings on ios * docs: update changelog
This commit is contained in:
@@ -23,7 +23,13 @@ and this project adheres to Calendar Versioning (CalVer).
|
||||
### Added
|
||||
- Leave group from chat list for non-last admins [PR #638](https://github.com/marmot-protocol/whitenoise/pull/638)
|
||||
- Add archive option in chat removed warning and change wording for leave case [PR #657](https://github.com/marmot-protocol/whitenoise/pull/657)
|
||||
- Add native deep links for users, chats, and settings [PR #661](https://github.com/marmot-protocol/whitenoise/pull/661)
|
||||
- Add markdown rendering for chat messages [PR #665](https://github.com/marmot-protocol/whitenoise/pull/665)
|
||||
- Push notifications [PR #673](https://github.com/marmot-protocol/whitenoise/pull/673)
|
||||
- Enable leave group [PR #675](https://github.com/marmot-protocol/whitenoise/pull/675)
|
||||
- Add members from group info screen [PR #679](https://github.com/marmot-protocol/whitenoise/pull/679)
|
||||
- Add key package developer controls [PR #685](https://github.com/marmot-protocol/whitenoise/pull/685)
|
||||
- Show notifications settings screen on iOS [PR #688](https://github.com/marmot-protocol/whitenoise/pull/688)
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/foundation.dart' show defaultTargetPlatform, TargetPlatform;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
@@ -146,13 +145,12 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
label: context.l10n.appearance,
|
||||
onTap: () => Routes.pushToAppearance(context),
|
||||
),
|
||||
if (defaultTargetPlatform == TargetPlatform.android)
|
||||
WnMenuItem(
|
||||
key: const Key('notification_settings_menu_item'),
|
||||
icon: WnIcons.notification,
|
||||
label: context.l10n.notificationSettings,
|
||||
onTap: () => Routes.pushToNotificationSettings(context),
|
||||
),
|
||||
WnMenuItem(
|
||||
key: const Key('notification_settings_menu_item'),
|
||||
icon: WnIcons.notification,
|
||||
label: context.l10n.notificationSettings,
|
||||
onTap: () => Routes.pushToNotificationSettings(context),
|
||||
),
|
||||
WnMenuItem(
|
||||
key: const Key('help_and_support_menu_item'),
|
||||
icon: WnIcons.helpChat,
|
||||
|
||||
@@ -316,7 +316,7 @@ void main() {
|
||||
expect(find.text('v1.2.3+45'), findsOneWidget);
|
||||
});
|
||||
|
||||
group('notification settings menu item (Android-only)', () {
|
||||
group('notification settings menu item', () {
|
||||
testWidgets('shows Notification Settings menu item on Android', (tester) async {
|
||||
debugDefaultTargetPlatformOverride = TargetPlatform.android;
|
||||
await pumpSettingsScreen(tester);
|
||||
@@ -326,12 +326,12 @@ void main() {
|
||||
expect(find.text('Notifications'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('does not show Notification Settings menu item on iOS', (tester) async {
|
||||
testWidgets('shows Notification Settings menu item on iOS', (tester) async {
|
||||
debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
|
||||
await pumpSettingsScreen(tester);
|
||||
debugDefaultTargetPlatformOverride = null;
|
||||
|
||||
expect(find.byKey(const Key('notification_settings_menu_item')), findsNothing);
|
||||
expect(find.byKey(const Key('notification_settings_menu_item')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('tapping Notification Settings navigates to NotificationSettingsScreen', (
|
||||
|
||||
Reference in New Issue
Block a user