diff --git a/app/android/app/src/main/res/drawable-hdpi/splash_icon.png b/app/android/app/src/main/res/drawable-hdpi/splash_icon.png new file mode 100644 index 000000000..c27ab7f7f Binary files /dev/null and b/app/android/app/src/main/res/drawable-hdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-mdpi/splash_icon.png b/app/android/app/src/main/res/drawable-mdpi/splash_icon.png new file mode 100644 index 000000000..623bc3245 Binary files /dev/null and b/app/android/app/src/main/res/drawable-mdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-night-hdpi/splash_icon.png b/app/android/app/src/main/res/drawable-night-hdpi/splash_icon.png new file mode 100644 index 000000000..c27ab7f7f Binary files /dev/null and b/app/android/app/src/main/res/drawable-night-hdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-night-mdpi/splash_icon.png b/app/android/app/src/main/res/drawable-night-mdpi/splash_icon.png new file mode 100644 index 000000000..623bc3245 Binary files /dev/null and b/app/android/app/src/main/res/drawable-night-mdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-night-xhdpi/splash_icon.png b/app/android/app/src/main/res/drawable-night-xhdpi/splash_icon.png new file mode 100644 index 000000000..767a2f1fc Binary files /dev/null and b/app/android/app/src/main/res/drawable-night-xhdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-night-xxhdpi/splash_icon.png b/app/android/app/src/main/res/drawable-night-xxhdpi/splash_icon.png new file mode 100644 index 000000000..8648b5f32 Binary files /dev/null and b/app/android/app/src/main/res/drawable-night-xxhdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-night-xxxhdpi/splash_icon.png b/app/android/app/src/main/res/drawable-night-xxxhdpi/splash_icon.png new file mode 100644 index 000000000..3b08e4b3c Binary files /dev/null and b/app/android/app/src/main/res/drawable-night-xxxhdpi/splash_icon.png differ diff --git a/app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/app/android/app/src/main/res/drawable-v21/background_v1.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png rename to app/android/app/src/main/res/drawable-v21/background_v1.png diff --git a/app/android/app/src/main/res/drawable-xhdpi/splash_icon.png b/app/android/app/src/main/res/drawable-xhdpi/splash_icon.png new file mode 100644 index 000000000..767a2f1fc Binary files /dev/null and b/app/android/app/src/main/res/drawable-xhdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-xxhdpi/splash_icon.png b/app/android/app/src/main/res/drawable-xxhdpi/splash_icon.png new file mode 100644 index 000000000..8648b5f32 Binary files /dev/null and b/app/android/app/src/main/res/drawable-xxhdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable-xxxhdpi/splash_icon.png b/app/android/app/src/main/res/drawable-xxxhdpi/splash_icon.png new file mode 100644 index 000000000..3b08e4b3c Binary files /dev/null and b/app/android/app/src/main/res/drawable-xxxhdpi/splash_icon.png differ diff --git a/app/android/app/src/main/res/drawable/background.png b/app/android/app/src/main/res/drawable/background.png index 059dcff36..cfc8e7dad 100644 Binary files a/app/android/app/src/main/res/drawable/background.png and b/app/android/app/src/main/res/drawable/background.png differ diff --git a/app/android/app/src/main/res/drawable/background_v1.png b/app/android/app/src/main/res/drawable/background_v1.png new file mode 100644 index 000000000..059dcff36 Binary files /dev/null and b/app/android/app/src/main/res/drawable/background_v1.png differ diff --git a/app/android/app/src/main/res/drawable/icon.png b/app/android/app/src/main/res/drawable/icon.png index 4f36e145a..c2b380f67 100644 Binary files a/app/android/app/src/main/res/drawable/icon.png and b/app/android/app/src/main/res/drawable/icon.png differ diff --git a/app/android/app/src/main/res/drawable/icon_v1.png b/app/android/app/src/main/res/drawable/icon_v1.png new file mode 100644 index 000000000..4f36e145a Binary files /dev/null and b/app/android/app/src/main/res/drawable/icon_v1.png differ diff --git a/app/android/app/src/main/res/drawable/icon_white.png b/app/android/app/src/main/res/drawable/icon_white.png index 116132561..daf44f879 100644 Binary files a/app/android/app/src/main/res/drawable/icon_white.png and b/app/android/app/src/main/res/drawable/icon_white.png differ diff --git a/app/android/app/src/main/res/drawable/icon_white_v1.png b/app/android/app/src/main/res/drawable/icon_white_v1.png new file mode 100644 index 000000000..116132561 Binary files /dev/null and b/app/android/app/src/main/res/drawable/icon_white_v1.png differ diff --git a/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher.png b/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher.png index ce7088018..2f5ba61ef 100644 Binary files a/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher.png and b/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher.png differ diff --git a/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher_v1.png b/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher_v1.png new file mode 100644 index 000000000..ce7088018 Binary files /dev/null and b/app/android/app/src/main/res/mipmap-hdpi/ic_stat_launcher_v1.png differ diff --git a/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher.png b/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher.png index 934c5a21f..e054bcc99 100644 Binary files a/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher.png and b/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher.png differ diff --git a/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher_v1.png b/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher_v1.png new file mode 100644 index 000000000..934c5a21f Binary files /dev/null and b/app/android/app/src/main/res/mipmap-mdpi/ic_stat_launcher_v1.png differ diff --git a/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher.png b/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher.png index b4d844d94..f3682c1d0 100644 Binary files a/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher.png and b/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher.png differ diff --git a/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher_v1.png b/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher_v1.png new file mode 100644 index 000000000..b4d844d94 Binary files /dev/null and b/app/android/app/src/main/res/mipmap-xhdpi/ic_stat_launcher_v1.png differ diff --git a/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher.png b/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher.png index d7f13edc8..f6e9efc54 100644 Binary files a/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher.png and b/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher.png differ diff --git a/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher_v1.png b/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher_v1.png new file mode 100644 index 000000000..d7f13edc8 Binary files /dev/null and b/app/android/app/src/main/res/mipmap-xxhdpi/ic_stat_launcher_v1.png differ diff --git a/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher.png b/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher.png index dd4178849..1e8096844 100644 Binary files a/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher.png and b/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher.png differ diff --git a/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher_v1.png b/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher_v1.png new file mode 100644 index 000000000..dd4178849 Binary files /dev/null and b/app/android/app/src/main/res/mipmap-xxxhdpi/ic_stat_launcher_v1.png differ diff --git a/app/android/app/src/main/res/values-night-v31/styles.xml b/app/android/app/src/main/res/values-night-v31/styles.xml index f23d4da24..6ab6fd50e 100644 --- a/app/android/app/src/main/res/values-night-v31/styles.xml +++ b/app/android/app/src/main/res/values-night-v31/styles.xml @@ -10,7 +10,7 @@ false shortEdges #000000 - @drawable/android12splash + @drawable/splash_icon @@ -14,10 +16,15 @@ + - - + + + + + + @@ -34,11 +41,11 @@ - + - - + + diff --git a/app/ios/Runner/Info.plist b/app/ios/Runner/Info.plist index a5633be87..9937b5553 100644 --- a/app/ios/Runner/Info.plist +++ b/app/ios/Runner/Info.plist @@ -55,9 +55,9 @@ LSRequiresIPhoneOS NSBluetoothAlwaysUsageDescription - Bluetooth permission is required to connect with your Friend Wearable. + Bluetooth permission is required to connect with your Omi. NSBluetoothPeripheralUsageDescription - Bluetooth permission is required to connect with your Friend Wearable. + Bluetooth permission is required to connect with your Omi. NSCalendarsFullAccessUsageDescription Access most functions for calendar viewing and editing. NSCalendarsUsageDescription diff --git a/app/lib/backend/schema/message.dart b/app/lib/backend/schema/message.dart index d9452657e..85eea5926 100644 --- a/app/lib/backend/schema/message.dart +++ b/app/lib/backend/schema/message.dart @@ -112,14 +112,14 @@ class ServerMessage { }; } - static ServerMessage empty() { + static ServerMessage empty({String? appId}) { return ServerMessage( '0000', DateTime.now(), '', MessageSender.ai, MessageType.text, - null, + appId, false, [], ); diff --git a/app/lib/gen/assets.gen.dart b/app/lib/gen/assets.gen.dart index fce474a12..444be4dbc 100644 --- a/app/lib/gen/assets.gen.dart +++ b/app/lib/gen/assets.gen.dart @@ -74,6 +74,10 @@ class $AssetsImagesGen { AssetGenImage get appLauncherIcon => const AssetGenImage('assets/images/app_launcher_icon.png'); + /// File path: assets/images/app_launcher_icon_v1.png + AssetGenImage get appLauncherIconV1 => + const AssetGenImage('assets/images/app_launcher_icon_v1.png'); + /// File path: assets/images/background.png AssetGenImage get background => const AssetGenImage('assets/images/background.png'); @@ -89,6 +93,14 @@ class $AssetsImagesGen { AssetGenImage get herologo => const AssetGenImage('assets/images/herologo.png'); + /// File path: assets/images/herologo_v1.png + AssetGenImage get herologoV1 => + const AssetGenImage('assets/images/herologo_v1.png'); + + /// File path: assets/images/herologo_v2.png + AssetGenImage get herologoV2 => + const AssetGenImage('assets/images/herologo_v2.png'); + /// File path: assets/images/ic_chart.svg String get icChart => 'assets/images/ic_chart.svg'; @@ -111,6 +123,10 @@ class $AssetsImagesGen { AssetGenImage get logoTransparent => const AssetGenImage('assets/images/logo_transparent.png'); + /// File path: assets/images/logo_transparent_v1.png + AssetGenImage get logoTransparentV1 => + const AssetGenImage('assets/images/logo_transparent_v1.png'); + /// File path: assets/images/recording_green_circle_icon.png AssetGenImage get recordingGreenCircleIcon => const AssetGenImage('assets/images/recording_green_circle_icon.png'); @@ -130,6 +146,14 @@ class $AssetsImagesGen { AssetGenImage get splashIcon => const AssetGenImage('assets/images/splash_icon.png'); + /// File path: assets/images/splash_icon_v1.png + AssetGenImage get splashIconV1 => + const AssetGenImage('assets/images/splash_icon_v1.png'); + + /// File path: assets/images/splash_v1.png + AssetGenImage get splashV1 => + const AssetGenImage('assets/images/splash_v1.png'); + /// File path: assets/images/stars.png AssetGenImage get stars => const AssetGenImage('assets/images/stars.png'); @@ -137,21 +161,27 @@ class $AssetsImagesGen { List get values => [ aiMagic, appLauncherIcon, + appLauncherIconV1, background, blob, emotionalFeedback1, herologo, + herologoV1, + herologoV2, icChart, icDollar, instruction1, instruction2, instruction3, logoTransparent, + logoTransparentV1, recordingGreenCircleIcon, speaker0Icon, speaker1Icon, splash, splashIcon, + splashIconV1, + splashV1, stars ]; } diff --git a/app/lib/pages/capture/connect.dart b/app/lib/pages/capture/connect.dart index e63797579..df8258b3b 100644 --- a/app/lib/pages/capture/connect.dart +++ b/app/lib/pages/capture/connect.dart @@ -17,7 +17,7 @@ class _ConnectDevicePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text('Connect Your Friend'), + title: const Text('Connect Your Omi'), backgroundColor: Theme.of(context).colorScheme.primary, actions: [ IconButton( diff --git a/app/lib/pages/capture/widgets/widgets.dart b/app/lib/pages/capture/widgets/widgets.dart index 0135b0430..aae65d91c 100644 --- a/app/lib/pages/capture/widgets/widgets.dart +++ b/app/lib/pages/capture/widgets/widgets.dart @@ -66,19 +66,15 @@ class SpeechProfileCardWidget extends StatelessWidget { ], ), ), - Icon(Icons.arrow_forward_ios) + Icon(Icons.arrow_forward_ios, color: Colors.white, size: 16), ], ), ), ), - Positioned( - top: 12, + const Positioned( + top: 6, right: 24, - child: Container( - width: 12, - height: 12, - decoration: const BoxDecoration(color: Colors.red, shape: BoxShape.circle), - ), + child: Icon(Icons.fiber_manual_record, color: Colors.red, size: 16.0), ), ], ); @@ -95,55 +91,49 @@ class UpdateFirmwareCardWidget extends StatelessWidget { Widget build(BuildContext context) { return Consumer( builder: (context, provider, child) { - return (provider.pairedDevice == null || !provider.isConnected) + return (provider.pairedDevice == null || !provider.isConnected || !provider.havingNewFirmware) ? const SizedBox() - : (provider.pairedDevice?.firmwareRevision != '1.0.2') - ? const SizedBox() - : Stack( - children: [ - GestureDetector( - onTap: () { - MixpanelManager().pageOpened('Update Firmware Memories'); - IntercomManager.instance.displayFirmwareUpdateArticle(); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.grey.shade900, - borderRadius: const BorderRadius.all(Radius.circular(12)), - ), - margin: const EdgeInsets.fromLTRB(16, 0, 16, 16), - padding: const EdgeInsets.all(16), - child: const Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Row( - children: [ - Icon(Icons.upload), - SizedBox(width: 16), - Text( - 'Update your Firmware', - style: TextStyle(color: Colors.white, fontSize: 16), - ), - ], + : Stack( + children: [ + GestureDetector( + onTap: () { + MixpanelManager().pageOpened('Update Firmware Memories'); + IntercomManager.instance.displayFirmwareUpdateArticle(); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey.shade900, + borderRadius: const BorderRadius.all(Radius.circular(12)), + ), + margin: const EdgeInsets.fromLTRB(16, 0, 16, 16), + padding: const EdgeInsets.all(16), + child: const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Row( + children: [ + Icon(Icons.upload), + SizedBox(width: 16), + Text( + 'Update your Firmware', + style: TextStyle(color: Colors.white, fontSize: 16), ), - ), - Icon(Icons.arrow_forward_ios) - ], + ], + ), ), - ), + Icon(Icons.arrow_forward_ios, color: Colors.white, size: 16), + ], ), - Positioned( - top: 12, - right: 24, - child: Container( - width: 12, - height: 12, - decoration: const BoxDecoration(color: Colors.red, shape: BoxShape.circle), - ), - ), - ], - ); + ), + ), + const Positioned( + top: 6, + right: 24, + child: Icon(Icons.fiber_manual_record, color: Colors.red, size: 16.0), + ), + ], + ); }, ); } diff --git a/app/lib/pages/chat/page.dart b/app/lib/pages/chat/page.dart index 8a6d276b5..e82531443 100644 --- a/app/lib/pages/chat/page.dart +++ b/app/lib/pages/chat/page.dart @@ -37,6 +37,8 @@ class ChatPageState extends State with AutomaticKeepAliveClientMixin { bool _showDeleteOption = false; bool isScrollingDown = false; + bool _showSendButton = false; + var prefs = SharedPreferencesUtil(); late List apps; @@ -88,9 +90,18 @@ class ChatPageState extends State with AutomaticKeepAliveClientMixin { super.dispose(); } + void setShowSendButton() { + if (_showSendButton != textController.text.isNotEmpty) { + setState(() { + _showSendButton = textController.text.isNotEmpty; + }); + } + } + @override Widget build(BuildContext context) { super.build(context); + return Consumer2( builder: (context, provider, connectivityProvider, child) { return Scaffold( @@ -236,12 +247,20 @@ class ChatPageState extends State with AutomaticKeepAliveClientMixin { ), ), Consumer(builder: (context, home, child) { + bool shouldShowSuffixIcon(MessageProvider p) { + return !p.sendingMessage && _showSendButton; + } + + bool shouldShowSendButton(MessageProvider p) { + return !p.sendingMessage && _showSendButton; + } + return Align( alignment: Alignment.bottomCenter, child: Container( width: double.maxFinite, - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 2), - margin: EdgeInsets.only(left: 32, right: 32, bottom: home.isChatFieldFocused ? 40 : 120), + padding: EdgeInsets.only(left: 16, right: shouldShowSuffixIcon(provider) ? 4 : 16, bottom: 4), + margin: EdgeInsets.only(left: 20, right: 20, bottom: home.isChatFieldFocused ? 20 : 120), decoration: const BoxDecoration( color: Colors.black, borderRadius: BorderRadius.all(Radius.circular(16)), @@ -265,49 +284,50 @@ class ChatPageState extends State with AutomaticKeepAliveClientMixin { // canRequestFocus: true, textAlign: TextAlign.start, textAlignVertical: TextAlignVertical.center, + onChanged: (_) { + setShowSendButton(); + }, decoration: InputDecoration( hintText: 'Message', hintStyle: const TextStyle(fontSize: 14.0, color: Colors.grey), focusedBorder: InputBorder.none, enabledBorder: InputBorder.none, - suffixIcon: IconButton( - splashColor: Colors.transparent, - splashRadius: 1, - onPressed: provider.sendingMessage - ? null - : () async { - String message = textController.text; - if (message.isEmpty) return; - if (connectivityProvider.isConnected) { - _sendMessageUtil(message); - } else { - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('Please check your internet connection and try again'), - duration: Duration(seconds: 2), - ), - ); - } - }, - icon: provider.sendingMessage - ? const SizedBox( - width: 16, - height: 16, - child: CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation(Colors.white), - ), - ) - : const Icon( - Icons.send_rounded, - color: Color(0xFFF7F4F4), - size: 24.0, - ), - ), + suffixIcon: shouldShowSuffixIcon(provider) + ? SizedBox( + width: 24, + height: 24, + child: shouldShowSendButton(provider) + ? IconButton( + splashColor: Colors.transparent, + splashRadius: 1, + onPressed: () async { + String message = textController.text; + if (message.isEmpty) return; + if (connectivityProvider.isConnected) { + _sendMessageUtil(message); + } else { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Please check your internet connection and try again'), + duration: Duration(seconds: 2), + ), + ); + } + }, + icon: const Icon( + Icons.arrow_upward_outlined, + color: Color(0xFFF7F4F4), + size: 20.0, + ), + ) + : const SizedBox.shrink(), + ) + : null, ), maxLines: 8, minLines: 1, keyboardType: TextInputType.multiline, - style: TextStyle(fontSize: 14.0, color: Colors.grey.shade200), + style: TextStyle(fontSize: 14.0, color: Colors.grey.shade200, height: 24 / 14), ), ), ); diff --git a/app/lib/pages/conversations/conversations_page.dart b/app/lib/pages/conversations/conversations_page.dart index 64f7acf56..a6ae71249 100644 --- a/app/lib/pages/conversations/conversations_page.dart +++ b/app/lib/pages/conversations/conversations_page.dart @@ -50,9 +50,10 @@ class _ConversationsPageState extends State with AutomaticKee const SliverToBoxAdapter(child: SizedBox(height: 26)), const SliverToBoxAdapter(child: SpeechProfileCardWidget()), const SliverToBoxAdapter(child: UpdateFirmwareCardWidget()), - const SliverToBoxAdapter(child: LocalSyncWidget()), const SliverToBoxAdapter(child: ConversationCaptureWidget()), + const SliverToBoxAdapter(child: SizedBox(height: 16)), const SliverToBoxAdapter(child: SearchWidget()), + const SliverToBoxAdapter(child: SizedBox(height: 16)), getProcessingConversationsWidget(convoProvider.processingConversations), if (convoProvider.groupedConversations.isEmpty && !convoProvider.isLoadingConversations) const SliverToBoxAdapter( @@ -80,7 +81,7 @@ class _ConversationsPageState extends State with AutomaticKee childCount: convoProvider.groupedConversations.length + 1, (context, index) { if (index == convoProvider.groupedConversations.length) { - print('loading more conversations'); + debugPrint('loading more conversations'); if (convoProvider.isLoadingConversations) { return const Center( child: Padding( @@ -113,9 +114,6 @@ class _ConversationsPageState extends State with AutomaticKee } else { var date = convoProvider.groupedConversations.keys.elementAt(index); List memoriesForDate = convoProvider.groupedConversations[date]!; - bool hasDiscarded = memoriesForDate.any((element) => element.discarded); - bool hasNonDiscarded = memoriesForDate.any((element) => !element.discarded); - return Column( mainAxisSize: MainAxisSize.min, children: [ @@ -124,9 +122,6 @@ class _ConversationsPageState extends State with AutomaticKee isFirst: index == 0, conversations: memoriesForDate, date: date, - hasNonDiscardedMemories: hasNonDiscarded, - showDiscardedMemories: convoProvider.showDiscardedConversations, - hasDiscardedMemories: hasDiscarded, ), ], ); diff --git a/app/lib/pages/conversations/widgets/conversation_list_item.dart b/app/lib/pages/conversations/widgets/conversation_list_item.dart index 6b7838d3a..09771d6d4 100644 --- a/app/lib/pages/conversations/widgets/conversation_list_item.dart +++ b/app/lib/pages/conversations/widgets/conversation_list_item.dart @@ -102,28 +102,7 @@ class _ConversationListItemState extends State { var conversation = widget.conversation; var conversationIdx = widget.conversationIdx; provider.deleteConversationLocally(conversation, conversationIdx, widget.date); - ScaffoldMessenger.of(context) - .showSnackBar( - SnackBar( - content: const Text('Conversation deleted successfully 🗑️'), - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), - action: SnackBarAction( - label: 'Undo', - textColor: Colors.white, - onPressed: () { - provider.undoDeleteConversation(conversation.id, conversationIdx); - }, - ), - ), - ) - .closed - .then((reason) { - if (reason != SnackBarClosedReason.action) { - if (provider.memoriesToDelete.containsKey(conversation.id)) { - provider.deleteConversationOnServer(conversation.id); - } - } - }); + provider.deleteConversationOnServer(conversation.id); }, child: Padding( padding: const EdgeInsetsDirectional.all(16), diff --git a/app/lib/pages/conversations/widgets/conversations_group_widget.dart b/app/lib/pages/conversations/widgets/conversations_group_widget.dart index 737ac7c4c..03f99e6fd 100644 --- a/app/lib/pages/conversations/widgets/conversations_group_widget.dart +++ b/app/lib/pages/conversations/widgets/conversations_group_widget.dart @@ -7,18 +7,8 @@ import 'conversation_list_item.dart'; class ConversationsGroupWidget extends StatelessWidget { final List conversations; final DateTime date; - final bool showDiscardedMemories; - final bool hasDiscardedMemories; - final bool hasNonDiscardedMemories; final bool isFirst; - const ConversationsGroupWidget( - {super.key, - required this.conversations, - required this.date, - required this.hasNonDiscardedMemories, - required this.showDiscardedMemories, - required this.hasDiscardedMemories, - required this.isFirst}); + const ConversationsGroupWidget({super.key, required this.conversations, required this.date, required this.isFirst}); @override Widget build(BuildContext context) { @@ -26,21 +16,12 @@ class ConversationsGroupWidget extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - if (!showDiscardedMemories && hasDiscardedMemories && !hasNonDiscardedMemories) - const SizedBox.shrink() - else - DateListItem(date: date, isFirst: isFirst), + DateListItem(date: date, isFirst: isFirst), ...conversations.map((conversation) { - if (!showDiscardedMemories && conversation.discarded) { - return const SizedBox.shrink(); - } return ConversationListItem( conversation: conversation, conversationIdx: conversations.indexOf(conversation), date: date); }), - if (!showDiscardedMemories && hasDiscardedMemories && !hasNonDiscardedMemories) - const SizedBox.shrink() - else - const SizedBox(height: 10), + const SizedBox(height: 10), ], ); } else { diff --git a/app/lib/pages/conversations/widgets/processing_capture.dart b/app/lib/pages/conversations/widgets/processing_capture.dart index 226ebceb8..65908d2d5 100644 --- a/app/lib/pages/conversations/widgets/processing_capture.dart +++ b/app/lib/pages/conversations/widgets/processing_capture.dart @@ -24,27 +24,6 @@ class ConversationCaptureWidget extends StatefulWidget { } class _ConversationCaptureWidgetState extends State { - bool _isReady = true; - Timer? _readyStateTimer; - - @override - void initState() { - super.initState(); - - //// Warn: Should ensure every deps has started before set ready - //_readyStateTimer = Timer(const Duration(seconds: 3), () { - // setState(() { - // _isReady = true; - // }); - //}); - } - - @override - void dispose() { - _readyStateTimer?.cancel(); - super.dispose(); - } - @override Widget build(BuildContext context) { return Consumer3( @@ -53,11 +32,6 @@ class _ConversationCaptureWidgetState extends State { ? provider.conversationProvider!.conversations.first.id : null; - // Waiting ready state, 3s for now - if (!_isReady) { - return const SizedBox.shrink(); - } - var header = _getConversationHeader(context); if (header == null) { return const SizedBox.shrink(); @@ -159,10 +133,7 @@ class _ConversationCaptureWidgetState extends State { } else if (!deviceServiceStateOk) { left = Row( children: [ - const Text( - '🎙️', - style: TextStyle(color: Colors.white, fontSize: 22, fontWeight: FontWeight.w600), - ), + const Icon(Icons.record_voice_over), const SizedBox(width: 12), Container( decoration: BoxDecoration( @@ -181,10 +152,7 @@ class _ConversationCaptureWidgetState extends State { } else { left = Row( children: [ - const Text( - '🎙️', - style: TextStyle(color: Colors.white, fontSize: 22, fontWeight: FontWeight.w600), - ), + const Icon(Icons.record_voice_over), const SizedBox(width: 12), Container( decoration: BoxDecoration( diff --git a/app/lib/pages/conversations/widgets/search_widget.dart b/app/lib/pages/conversations/widgets/search_widget.dart index b1dafdce9..7f7b990e9 100644 --- a/app/lib/pages/conversations/widgets/search_widget.dart +++ b/app/lib/pages/conversations/widgets/search_widget.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:friend_private/backend/preferences.dart'; import 'package:friend_private/providers/conversation_provider.dart'; import 'package:friend_private/providers/home_provider.dart'; import 'package:friend_private/utils/other/debouncer.dart'; @@ -27,81 +26,54 @@ class _SearchWidgetState extends State { @override Widget build(BuildContext context) { - return Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - padding: const EdgeInsets.fromLTRB(16, 16, 2, 10), - width: MediaQuery.sizeOf(context).width * 0.85, - child: TextFormField( - controller: searchController, - focusNode: context.read().convoSearchFieldFocusNode, - onChanged: (value) { - var provider = Provider.of(context, listen: false); - _debouncer.run(() async { - await provider.searchConversations(value); - }); - setShowClearButton(); - }, - decoration: InputDecoration( - hintText: 'Search Conversations', - hintStyle: TextStyle(color: Colors.grey.shade500), - filled: false, - // fillColor: Colors.grey[900], - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(12), - borderSide: BorderSide(color: Colors.grey.shade800, width: 0.5), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(12), - borderSide: BorderSide(color: Colors.grey.shade500, width: 0.5), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(12), - borderSide: BorderSide(color: Colors.grey.shade500, width: 0.5), - ), - prefixIcon: Icon( - Icons.search, - color: Colors.grey.shade500, - ), - suffixIcon: showClearButton - ? GestureDetector( - onTap: () { - var provider = Provider.of(context, listen: false); - provider.resetGroupedConvos(); - searchController.clear(); - setShowClearButton(); - }, - child: const Icon( - Icons.close, - color: Colors.white, - ), - ) - : null, - contentPadding: const EdgeInsets.symmetric(horizontal: 12), - ), - style: const TextStyle(color: Colors.white), + return Container( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 0), + child: TextFormField( + controller: searchController, + focusNode: context.read().convoSearchFieldFocusNode, + onChanged: (value) { + var provider = Provider.of(context, listen: false); + _debouncer.run(() async { + await provider.searchConversations(value); + }); + setShowClearButton(); + }, + decoration: InputDecoration( + hintText: 'Search Conversations', + hintStyle: const TextStyle(color: Colors.white60, fontSize: 14), + filled: true, + fillColor: Colors.grey.shade900, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(16), ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(16), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(16), + ), + prefixIcon: Icon( + Icons.search, + color: Colors.white60, + ), + suffixIcon: showClearButton + ? GestureDetector( + onTap: () { + var provider = Provider.of(context, listen: false); + provider.resetGroupedConvos(); + searchController.clear(); + setShowClearButton(); + }, + child: const Icon( + Icons.close, + color: Colors.white, + ), + ) + : null, + contentPadding: const EdgeInsets.symmetric(horizontal: 12), ), - Consumer2(builder: (context, convoProvider, home, child) { - if (home.selectedIndex != 0 || - !convoProvider.hasNonDiscardedConversations || - convoProvider.isLoadingConversations) { - return const SizedBox.shrink(); - } - return Padding( - padding: const EdgeInsets.only(left: 2.0, top: 12), - child: IconButton( - onPressed: convoProvider.toggleDiscardConversations, - icon: Icon( - SharedPreferencesUtil().showDiscardedMemories ? Icons.filter_list_off_sharp : Icons.filter_list, - color: Colors.white, - size: 24, - ), - ), - ); - }), - ], + style: const TextStyle(color: Colors.white), + ), ); } } diff --git a/app/lib/pages/home/firmware_mixin.dart b/app/lib/pages/home/firmware_mixin.dart index 8ea24c710..413b4e08c 100644 --- a/app/lib/pages/home/firmware_mixin.dart +++ b/app/lib/pages/home/firmware_mixin.dart @@ -124,7 +124,7 @@ mixin FirmwareMixin on State { false ); } else { - return ('A new version is available! Update your Friend now.', true); + return ('A new version is available! Update your Omi now.', true); } } else { return ('You are already on the latest version', false); diff --git a/app/lib/pages/onboarding/find_device/page.dart b/app/lib/pages/onboarding/find_device/page.dart index 5d50c13c1..e7599d223 100644 --- a/app/lib/pages/onboarding/find_device/page.dart +++ b/app/lib/pages/onboarding/find_device/page.dart @@ -61,7 +61,7 @@ class _FindDevicesPageState extends State { }, () {}, 'Enable Bluetooth', - 'Friend needs Bluetooth to connect to your wearable. Please enable Bluetooth and try again.', + 'Omi needs Bluetooth to connect to your wearable. Please enable Bluetooth and try again.', singleButton: true, ), ); diff --git a/app/lib/pages/onboarding/setup/setup_questions.dart b/app/lib/pages/onboarding/setup/setup_questions.dart index b73e6af3d..6fdf63332 100644 --- a/app/lib/pages/onboarding/setup/setup_questions.dart +++ b/app/lib/pages/onboarding/setup/setup_questions.dart @@ -31,7 +31,7 @@ class _SetupQuestionsPageState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Text( - 'Help us improve Friend by answering a few questions. 🫶 💜', + 'Help us improve Omi by answering a few questions. 🫶 💜', style: Theme.of(context).textTheme.titleLarge, textAlign: TextAlign.start, ), @@ -52,7 +52,7 @@ class _SetupQuestionsPageState extends State { const SizedBox(height: 40), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), - child: Text('2. Where do you plan to use your Friend?', style: Theme.of(context).textTheme.titleLarge), + child: Text('2. Where do you plan to use your Omi?', style: Theme.of(context).textTheme.titleLarge), ), const SizedBox(height: 16), for (var i = 0; i < options2.length; i++) diff --git a/app/lib/pages/onboarding/welcome/page.dart b/app/lib/pages/onboarding/welcome/page.dart index cf93b3cd5..e2801ad19 100644 --- a/app/lib/pages/onboarding/welcome/page.dart +++ b/app/lib/pages/onboarding/welcome/page.dart @@ -91,7 +91,7 @@ class _WelcomePageState extends State with SingleTickerProviderStat height: 45, // Fixed height for the button alignment: Alignment.center, child: const Text( - 'Connect My Friend', + 'Connect My Omi', style: TextStyle( fontWeight: FontWeight.w400, fontSize: 18, diff --git a/app/lib/pages/onboarding/wrapper.dart b/app/lib/pages/onboarding/wrapper.dart index 0305aba7d..4f0ce624a 100644 --- a/app/lib/pages/onboarding/wrapper.dart +++ b/app/lib/pages/onboarding/wrapper.dart @@ -181,17 +181,17 @@ class _OnboardingWrapperState extends State with TickerProvid physics: const NeverScrollableScrollPhysics(), children: [ DeviceAnimationWidget(animatedBackground: _controller!.index != -1), - _controller!.index == 6 || _controller!.index == 7 - ? const SizedBox() - : Center( - child: Text( - 'Omi', - style: TextStyle( - color: Colors.grey.shade200, - fontSize: _controller!.index == _controller!.length - 1 ? 28 : 40, - fontWeight: FontWeight.w500), - ), - ), + // _controller!.index == 6 || _controller!.index == 7 + // ? const SizedBox() + // : Center( + // child: Text( + // 'Omi', + // style: TextStyle( + // color: Colors.grey.shade200, + // fontSize: _controller!.index == _controller!.length - 1 ? 28 : 40, + // fontWeight: FontWeight.w500), + // ), + // ), const SizedBox(height: 24), [-1, 5, 6, 7].contains(_controller?.index) ? const SizedBox( @@ -203,7 +203,7 @@ class _OnboardingWrapperState extends State with TickerProvid _controller!.index == _controller!.length - 1 ? 'Your personal growth journey with AI that listens to your every word.' : 'Your personal growth journey with AI that listens to your every word.', - style: TextStyle(color: Colors.grey.shade300, fontSize: 16), + style: TextStyle(color: Colors.grey.shade300, fontSize: 24), textAlign: TextAlign.center, ), ), diff --git a/app/lib/pages/settings/device_settings.dart b/app/lib/pages/settings/device_settings.dart index 628e61100..81e8602e8 100644 --- a/app/lib/pages/settings/device_settings.dart +++ b/app/lib/pages/settings/device_settings.dart @@ -141,7 +141,7 @@ class _DeviceSettingsState extends State { Navigator.of(context).pop(); ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text( - 'Your Friend is ${provider.connectedDevice == null ? "unpaired" : "disconnected"} 😔'), + 'Your Omi is ${provider.connectedDevice == null ? "unpaired" : "disconnected"} 😔'), )); MixpanelManager().disconnectFriendClicked(); }, @@ -164,7 +164,7 @@ List deviceSettingsWidgets(BtDevice? device, BuildContext context) { return [ ListTile( title: const Text('Device Name'), - subtitle: Text(device?.name ?? 'Friend'), + subtitle: Text(device?.name ?? 'Omi DevKit'), ), ListTile( title: const Text('Device ID'), @@ -217,7 +217,7 @@ List deviceSettingsWidgets(BtDevice? device, BuildContext context) { ), ListTile( title: const Text('Model Number'), - subtitle: Text(device?.modelNumber ?? 'Friend'), + subtitle: Text(device?.modelNumber ?? 'Omi DevKit'), ), ListTile( title: const Text('Manufacturer Name'), diff --git a/app/lib/providers/conversation_provider.dart b/app/lib/providers/conversation_provider.dart index ade511865..e73c1bc14 100644 --- a/app/lib/providers/conversation_provider.dart +++ b/app/lib/providers/conversation_provider.dart @@ -15,7 +15,6 @@ class ConversationProvider extends ChangeNotifier implements IWalServiceListener bool isLoadingConversations = false; bool hasNonDiscardedConversations = true; - bool showDiscardedConversations = false; String previousQuery = ''; int totalSearchPages = 1; @@ -142,14 +141,6 @@ class ConversationProvider extends ChangeNotifier implements IWalServiceListener } } - void toggleDiscardConversations() { - MixpanelManager().showDiscardedMemoriesToggled(!SharedPreferencesUtil().showDiscardedMemories); - SharedPreferencesUtil().showDiscardedMemories = !SharedPreferencesUtil().showDiscardedMemories; - showDiscardedConversations = SharedPreferencesUtil().showDiscardedMemories; - // filterGroupedMemories(''); - notifyListeners(); - } - void setLoadingConversations(bool value) { isLoadingConversations = value; notifyListeners(); @@ -176,13 +167,13 @@ class ConversationProvider extends ChangeNotifier implements IWalServiceListener void _groupSearchConvosByDateWithoutNotify() { groupedConversations = {}; for (var conversation in searchedConversations) { - // if (SharedPreferencesUtil().showDiscardedMemories && conversation.discarded && !conversation.isNew) continue; var date = DateTime(conversation.createdAt.year, conversation.createdAt.month, conversation.createdAt.day); if (!groupedConversations.containsKey(date)) { groupedConversations[date] = []; } groupedConversations[date]?.add(conversation); } + // Sort for (final date in groupedConversations.keys) { groupedConversations[date]?.sort((a, b) => b.createdAt.compareTo(a.createdAt)); @@ -192,13 +183,13 @@ class ConversationProvider extends ChangeNotifier implements IWalServiceListener void _groupConversationsByDateWithoutNotify() { groupedConversations = {}; for (var conversation in conversations) { - // if (SharedPreferencesUtil().showDiscardedMemories && conversation.discarded && !conversation.isNew) continue; var date = DateTime(conversation.createdAt.year, conversation.createdAt.month, conversation.createdAt.day); if (!groupedConversations.containsKey(date)) { groupedConversations[date] = []; } groupedConversations[date]?.add(conversation); } + // Sort for (final date in groupedConversations.keys) { groupedConversations[date]?.sort((a, b) => b.createdAt.compareTo(a.createdAt)); diff --git a/app/lib/providers/device_provider.dart b/app/lib/providers/device_provider.dart index 40ed2a848..abf117cf8 100644 --- a/app/lib/providers/device_provider.dart +++ b/app/lib/providers/device_provider.dart @@ -23,6 +23,8 @@ class DeviceProvider extends ChangeNotifier implements IDeviceServiceSubsciption Timer? _reconnectionTimer; int connectionCheckSeconds = 4; + bool get havingNewFirmware => false; // FIXME + Timer? _disconnectNotificationTimer; DeviceProvider() { @@ -220,12 +222,12 @@ class DeviceProvider extends ChangeNotifier implements IDeviceServiceSubsciption print('after resetState inside initiateConnectionListener'); - InstabugLog.logInfo('Friend Device Disconnected'); + InstabugLog.logInfo('Omi Device Disconnected'); _disconnectNotificationTimer?.cancel(); _disconnectNotificationTimer = Timer(const Duration(seconds: 30), () { NotificationService.instance.createNotification( - title: 'Your Friend Device Disconnected', - body: 'Please reconnect to continue using your Friend.', + title: 'Your Omi Device Disconnected', + body: 'Please reconnect to continue using your Omi.', ); }); MixpanelManager().deviceDisconnected(); diff --git a/app/lib/providers/message_provider.dart b/app/lib/providers/message_provider.dart index aa2db44e6..440101725 100644 --- a/app/lib/providers/message_provider.dart +++ b/app/lib/providers/message_provider.dart @@ -115,7 +115,7 @@ class MessageProvider extends ChangeNotifier { Future sendMessageToServer(String message, String? appId) async { setShowTypingIndicator(true); - messages.insert(0, ServerMessage.empty()); + messages.insert(0, ServerMessage.empty(appId: appId)); var mes = await sendMessageServer(message, appId: appId); if (messages[0].id == '0000') { messages[0] = mes; diff --git a/app/lib/services/notifications.dart b/app/lib/services/notifications.dart index c3bd0fed1..31ac5a683 100644 --- a/app/lib/services/notifications.dart +++ b/app/lib/services/notifications.dart @@ -27,8 +27,8 @@ class NotificationService { final channel = NotificationChannel( channelGroupKey: 'channel_group_key', channelKey: 'channel', - channelName: 'Friend Notifications', - channelDescription: 'Notification channel for Friend', + channelName: 'Omi Notifications', + channelDescription: 'Notification channel for Omi', defaultColor: const Color(0xFF9D50DD), ledColor: Colors.white, ); @@ -109,8 +109,8 @@ class NotificationService { await platform.invokeMethod( 'setNotificationOnKillService', { - 'title': "Your Friend Device Disconnected", - 'description': "Please keep your app opened to continue using your Friend.", + 'title': "Your Omi Device Disconnected", + 'description': "Please keep your app opened to continue using your Omi.", }, ); } catch (e) { diff --git a/app/lib/utils/audio/foreground.dart b/app/lib/utils/audio/foreground.dart index 75b1c3cc0..b8a1f7bd1 100644 --- a/app/lib/utils/audio/foreground.dart +++ b/app/lib/utils/audio/foreground.dart @@ -124,7 +124,7 @@ class ForegroundUtil { return FlutterForegroundTask.restartService(); } else { return await FlutterForegroundTask.startService( - notificationTitle: 'Your Friend Device is connected.', + notificationTitle: 'Your Omi Device is connected.', notificationText: 'Transcription service is running in the background.', callback: _startForegroundCallback, ); diff --git a/app/lib/widgets/device_widget.dart b/app/lib/widgets/device_widget.dart index 81a95ba4e..563c87edf 100644 --- a/app/lib/widgets/device_widget.dart +++ b/app/lib/widgets/device_widget.dart @@ -46,23 +46,23 @@ class _DeviceAnimationWidgetState extends State with Tick Image.asset( Assets.images.stars.path, ), - widget.animatedBackground - ? AnimatedBuilder( - animation: _animation, - builder: (context, child) { - return Image.asset( - Assets.images.blob.path, - height: (MediaQuery.sizeOf(context).height <= 700 ? 360 : 390) * - widget.sizeMultiplier * - _animation.value, - width: (MediaQuery.sizeOf(context).height <= 700 ? 360 : 390) * - widget.sizeMultiplier * - _animation.value, - ); - }, - ) - : Container(), - // Image.asset("assets/images/blob.png"), + //widget.animatedBackground + // ? AnimatedBuilder( + // animation: _animation, + // builder: (context, child) { + // return Image.asset( + // Assets.images.blob.path, + // height: (MediaQuery.sizeOf(context).height <= 700 ? 360 : 390) * + // widget.sizeMultiplier * + // _animation.value, + // width: (MediaQuery.sizeOf(context).height <= 700 ? 360 : 390) * + // widget.sizeMultiplier * + // _animation.value, + // ); + // }, + // ) + // : Container(), + //// Image.asset("assets/images/blob.png"), Image.asset( Assets.images.herologo.path, height: (MediaQuery.sizeOf(context).height <= 700 ? 130 : 160) * widget.sizeMultiplier, diff --git a/plugins/example/templates/okpage.html b/plugins/example/templates/okpage.html index 8faa9529a..d19e0e1df 100644 --- a/plugins/example/templates/okpage.html +++ b/plugins/example/templates/okpage.html @@ -88,7 +88,7 @@
-

Notion is connected with your Friend

+

Notion is connected with your Omi

diff --git a/plugins/instructions/zapier/README.md b/plugins/instructions/zapier/README.md index ebded1391..09f9b07f6 100644 --- a/plugins/instructions/zapier/README.md +++ b/plugins/instructions/zapier/README.md @@ -1,5 +1,5 @@ 1. Accept [beta-test invitation](https://zapier.com/developer/public-invite/209831/fdb4140323d1870eb9f72c76c864c8e0/) -2. Connect to Zapier and find the Secret Key 👉 [Zapier x Friend](https://based-hardware--plugins-api.modal.run/setup-zapier). +2. Connect to Zapier and find the Secret Key 👉 [Zapier x Omi](https://based-hardware--plugins-api.modal.run/setup-zapier). #### --