Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmohsin7 committed Sep 23, 2024
1 parent 4d7e0bc commit def9628
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/lib/pages/settings/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:friend_private/pages/settings/widgets.dart';
import 'package:friend_private/utils/analytics/mixpanel.dart';
import 'package:friend_private/utils/other/temp.dart';
import 'package:friend_private/widgets/dialog.dart';
import 'package:intercom_flutter/intercom_flutter.dart';
import 'package:package_info_plus/package_info_plus.dart';

import 'device_settings.dart';
Expand Down Expand Up @@ -92,6 +93,14 @@ class _SettingsPageState extends State<SettingsPage> {
SharedPreferencesUtil().recordingsLanguage = _selectedLanguage;
MixpanelManager().recordingLanguageChanged(_selectedLanguage);
}, _selectedLanguage),
getItemAddOn2(
'Need Help? Chat with us',
() async {
await Intercom.instance.displayMessenger();
},
icon: Icons.chat,
),
const SizedBox(height: 20),
getItemAddOn2(
'Profile',
() => routeToPage(context, const ProfilePage()),
Expand Down
2 changes: 2 additions & 0 deletions app/lib/services/notification_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import 'package:friend_private/backend/preferences.dart';
import 'package:friend_private/backend/schema/message.dart';
import 'package:friend_private/main.dart';
import 'package:friend_private/pages/home/page.dart';
import 'package:intercom_flutter/intercom_flutter.dart';

class NotificationService {
NotificationService._();
Expand Down Expand Up @@ -124,6 +125,7 @@ class NotificationService {
if (token == null) return;
String timeZone = await getTimeZone();
if (FirebaseAuth.instance.currentUser != null && token.isNotEmpty) {
await Intercom.instance.sendTokenToIntercom(token);
await saveFcmTokenServer(token: token, timeZone: timeZone);
}
}
Expand Down

0 comments on commit def9628

Please sign in to comment.