From 545db7ebe26fb4b1b3a49107a46d3fd1f355b3f6 Mon Sep 17 00:00:00 2001 From: Efthymis Sarmpanis Date: Thu, 4 Jan 2024 17:25:33 +0200 Subject: [PATCH 1/5] fix(doc): fix inner links to the restructured pages --- .../05-customize_attachment_picker_modal.mdx | 2 +- .../03-custom_widgets/06-autocomplete_triggers.mdx | 2 +- .../04-channel_list/stream_channel_list_header.mdx | 4 ++-- .../04-channel_list/stream_channel_list_view.mdx | 6 +++--- .../06-message_list/stream_message_list_view.mdx | 4 ++-- .../stream_message_search_list_view.mdx | 4 ++-- .../07-message_composer/stream_message_input.mdx | 6 +++--- .../08-member_list/stream_member_list_view.mdx | 2 +- .../09-user_list/stream_user_list_view.mdx | 4 ++-- .../stream_channel_list_controller.mdx | 2 +- .../stream_member_list_controller.mdx | 2 +- .../stream_message_input_controller.mdx | 2 +- .../stream_message_search_list_controller.mdx | 2 +- .../stream_user_list_controller.mdx | 2 +- .../05-guides/08-migrations/migration_guide_4_0.mdx | 8 ++++---- .../05-guides/08-migrations/migration_guide_5_0.mdx | 12 ++++++------ .../09-initialize_stream_chat_widget_tree.mdx | 2 +- 17 files changed, 33 insertions(+), 33 deletions(-) diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/05-customize_attachment_picker_modal.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/05-customize_attachment_picker_modal.mdx index 4e89830b5..db4cb97b1 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/05-customize_attachment_picker_modal.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/05-customize_attachment_picker_modal.mdx @@ -8,7 +8,7 @@ Customizing the Attachment Picker Modal ### Introduction The Attachment Picker is a modal that allows users to select attachments from their device. -It is generally used when a user taps the attachment button in the [StreamMessageInput](../../03-stream_chat_flutter/stream_message_input.mdx). +It is generally used when a user taps the attachment button in the [StreamMessageInput](../07-message_composer/stream_message_input.mdx). By default, the Attachment Picker provides multiple picker options as per the platform. - For example, on Mobile, the default options are Camera, Gallery, File, and Video. diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/06-autocomplete_triggers.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/06-autocomplete_triggers.mdx index 601106dc9..0a3d9d309 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/06-autocomplete_triggers.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/03-custom_widgets/06-autocomplete_triggers.mdx @@ -7,7 +7,7 @@ Adding Custom Autocomplete Triggers ### Introduction -The [StreamMessageInput](../../03-stream_chat_flutter/stream_message_input.mdx) widget provides a way to add custom autocomplete triggers using the `StreamMessageInput.customAutocompleteTriggers` property. +The [StreamMessageInput](../07-message_composer/stream_message_input.mdx) widget provides a way to add custom autocomplete triggers using the `StreamMessageInput.customAutocompleteTriggers` property. By default we provide autocomplete triggers for mentions and commands, but it's very easy to add your custom ones. diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_header.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_header.mdx index 4650be265..88756f75a 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_header.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_header.mdx @@ -8,7 +8,7 @@ A Header Widget For A List Of Channels Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelListHeader-class.html) -![](../assets/channel_list_header.png) +![](../../assets/channel_list_header.png) ### Background @@ -88,7 +88,7 @@ StreamChannelListHeader( ), ``` -![](../assets/channel_list_header_custom_subtitle.png) +![](../../assets/channel_list_header_custom_subtitle.png) The `titleBuilder` parameter helps you build different titles depending on the connection state: diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx index 33aa49550..e09ab0cb9 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx @@ -8,7 +8,7 @@ A Widget For Displaying A List Of Channels Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelListView-class.html) -![](../assets/channel_list_view.png) +![](../../assets/channel_list_view.png) ### Background @@ -23,7 +23,7 @@ ONLY the channels that the user is a part of. This section goes into setting up widget. :::note -Make sure to check the [StreamChannelListController](../04-stream_chat_flutter_core/stream_channel_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamChannelListView`. +Make sure to check the [StreamChannelListController](../../04-stream_chat_flutter_core/stream_channel_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamChannelListView`. ::: ### Basic Example @@ -104,4 +104,4 @@ StreamChannelListView( Which gives you a new Channel preview in the list: -![](../assets/channel_preview.png) +![](../../assets/channel_preview.png) diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_list_view.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_list_view.mdx index df13bba38..d8c904b28 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_list_view.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_list_view.mdx @@ -8,7 +8,7 @@ A Widget For Displaying A List Of Messages Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageListView-class.html) -![](../assets/message_list_view.png) +![](../../assets/message_list_view.png) ### Background @@ -64,7 +64,7 @@ StreamMessageListView( ), ``` -![](../assets/message_list_view_threads.png) +![](../../assets/message_list_view_threads.png) The `StreamMessageListView` itself can render the thread by supplying the `parentMessage` parameter. diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_search_list_view.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_search_list_view.mdx index 04befede2..b9529ec38 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_search_list_view.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/06-message_list/stream_message_search_list_view.mdx @@ -8,7 +8,7 @@ A Widget To Search For Messages Across Channels Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageSearchListView-class.html) -![](../assets/message_search_list_view.png) +![](../../assets/message_search_list_view.png) ### Background @@ -17,7 +17,7 @@ message they are searching for. As such, there needs to be a way to search for a channels. This is where `StreamMessageSearchListView` comes in. :::note -Make sure to check the [StreamMessageSearchListController](../04-stream_chat_flutter_core/stream_message_search_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamMessageSearchListView`. +Make sure to check the [StreamMessageSearchListController](../../04-stream_chat_flutter_core/stream_message_search_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamMessageSearchListView`. ::: ### Basic Example diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/07-message_composer/stream_message_input.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/07-message_composer/stream_message_input.mdx index 517d032ee..a3ddcd33f 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/07-message_composer/stream_message_input.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/07-message_composer/stream_message_input.mdx @@ -8,7 +8,7 @@ A Widget Dealing With Everything Related To Sending A Message Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageInput-class.html) -![](../assets/message_input.png) +![](../../assets/message_input.png) ### Background @@ -57,7 +57,7 @@ class ChannelPage extends StatelessWidget { It is common to put this widget in the same page of a `StreamMessageListView` as the bottom widget. :::note -Make sure to check the [StreamMessageInputController](../04-stream_chat_flutter_core/stream_message_input_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamMessageInput`. +Make sure to check the [StreamMessageInputController](../../04-stream_chat_flutter_core/stream_message_input_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamMessageInput`. ::: ### Adding Custom Actions @@ -110,4 +110,4 @@ StreamMessageInput( ), ``` -![](../assets/message_input_change_position.png) +![](../../assets/message_input_change_position.png) diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/08-member_list/stream_member_list_view.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/08-member_list/stream_member_list_view.mdx index 2a54c713b..2f25120ec 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/08-member_list/stream_member_list_view.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/08-member_list/stream_member_list_view.mdx @@ -13,7 +13,7 @@ Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_ A list of members is required for many different purposes, for example, showing a list of users in a Channel. The `StreamMemberListView` displays a list of members. :::note -Make sure to check the [StreamMemberListController](../04-stream_chat_flutter_core/stream_member_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamMemberListView`. +Make sure to check the [StreamMemberListController](../../04-stream_chat_flutter_core/stream_member_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamMemberListView`. ::: ### Basic Example diff --git a/docusaurus/docs/Flutter/02-stream_chat_flutter/09-user_list/stream_user_list_view.mdx b/docusaurus/docs/Flutter/02-stream_chat_flutter/09-user_list/stream_user_list_view.mdx index 1a1e2eba0..f9002d8bf 100644 --- a/docusaurus/docs/Flutter/02-stream_chat_flutter/09-user_list/stream_user_list_view.mdx +++ b/docusaurus/docs/Flutter/02-stream_chat_flutter/09-user_list/stream_user_list_view.mdx @@ -8,7 +8,7 @@ A Widget For Displaying And Selecting Users Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamUserListView-class.html) -![](../assets/user_list_view.png) +![](../../assets/user_list_view.png) ### Background @@ -17,7 +17,7 @@ selecting users to add in a channel, etc. The `StreamUserListView` displays a li of users. :::note -Make sure to check the [StreamUserListController](../04-stream_chat_flutter_core/stream_user_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamUserListView`. +Make sure to check the [StreamUserListController](../../04-stream_chat_flutter_core/stream_user_list_controller.mdx) documentation for more information on how to use the controller to manipulate the `StreamUserListView`. ::: ### Basic Example diff --git a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_channel_list_controller.mdx b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_channel_list_controller.mdx index 9095ba4d8..56aae2127 100644 --- a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_channel_list_controller.mdx +++ b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_channel_list_controller.mdx @@ -12,7 +12,7 @@ Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_ The `StreamChannelListController` is a controller class that allows you to control a list of channels. `StreamChannelListController` is a required parameter of the `StreamChannelListView` widget. -Check the [`StreamChannelListView` documentation](../03-stream_chat_flutter/stream_channel_list_view.mdx) to read more about that. +Check the [`StreamChannelListView` documentation](../02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx) to read more about that. The `StreamChannelListController` also listens for various events and manipulates the current list of channels accordingly. Passing a `StreamChannelListEventHandler` to the `StreamChannelListController` will allow you to customize this behaviour. diff --git a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_member_list_controller.mdx b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_member_list_controller.mdx index 04401eb45..04060d037 100644 --- a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_member_list_controller.mdx +++ b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_member_list_controller.mdx @@ -12,7 +12,7 @@ Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_ The `StreamMemberListController` is a controller class that allows you to control a list of users. `StreamMemberListController` is a required parameter of the `StreamMemberListView` widget. -Check the [`StreamMemberListView` documentation](../03-stream_chat_flutter/stream_member_list_view.mdx) to read more about that. +Check the [`StreamMemberListView` documentation](../02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx) to read more about that. ### Basic Example diff --git a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_input_controller.mdx b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_input_controller.mdx index c7f8971be..0364fc48c 100644 --- a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_input_controller.mdx +++ b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_input_controller.mdx @@ -12,7 +12,7 @@ Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_ The `StreamMessageInputController` is a controller class that embed the business logic to compose a message. `StreamMessageInputController` is a parameter of the `StreamMessageInput` widget. -Check the [`StreamMessageInput` documentation](../03-stream_chat_flutter/stream_message_input.mdx) to read more about that. +Check the [`StreamMessageInput` documentation](../02-stream_chat_flutter/07-message_composer/stream_message_input.mdx) to read more about that. ### Basic Example diff --git a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_search_list_controller.mdx b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_search_list_controller.mdx index 40a0bd816..21d13c6c2 100644 --- a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_search_list_controller.mdx +++ b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_message_search_list_controller.mdx @@ -12,7 +12,7 @@ Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_ The `StreamMessageSearchListController` is a controller class that allows you to control a list of searched messages. `StreamMessageSearchListController` is a required parameter of the `StreamMessageSearchListView` widget. -Check the [`StreamMessageSearchListView` documentation](../03-stream_chat_flutter/stream_message_search_list_view.mdx) to read more about that. +Check the [`StreamMessageSearchListView` documentation](../02-stream_chat_flutter/06-message_list/stream_message_search_list_view.mdx) to read more about that. ### Basic Example diff --git a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_user_list_controller.mdx b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_user_list_controller.mdx index ec40bef2e..ba3835e9b 100644 --- a/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_user_list_controller.mdx +++ b/docusaurus/docs/Flutter/04-stream_chat_flutter_core/stream_user_list_controller.mdx @@ -12,7 +12,7 @@ Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_ The `StreamUserListController` is a controller class that allows you to control a list of users. `StreamUserListController` is a required parameter of the `StreamUserListView` widget. -Check the [`StreamUserListView` documentation](../03-stream_chat_flutter/stream_user_list_view.mdx) to read more about that. +Check the [`StreamUserListView` documentation](../02-stream_chat_flutter/09-user_list/stream_user_list_view.mdx) to read more about that. ### Basic Example diff --git a/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_4_0.mdx b/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_4_0.mdx index 93c179de3..50e4d3366 100644 --- a/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_4_0.mdx +++ b/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_4_0.mdx @@ -77,7 +77,7 @@ The automatic video compression when uploading a video has been removed. You can ### Slidable Channel List Item -The default slidable channel preview behavior has been removed. We have created a [guide](../../02-customization/01-custom-widgets/07-slidable_channel_list_preview.mdx) showing you how you can easily add this functionality yourself. +The default slidable channel preview behavior has been removed. We have created a [guide](../../02-stream_chat_flutter/03-custom_widgets/07-slidable_channel_list_preview.mdx) showing you how you can easily add this functionality yourself. ![Slidable demo](../../assets/slidable_demo.jpg) @@ -195,7 +195,7 @@ Version 4 of the Stream Chat Flutter packages introduces a new controller called - Return/Create a new channel and start watching it. - Pause and Resume all subscriptions added to this composite. -For more information see the [`StreamChannelListView` documentation](../../03-stream_chat_flutter/stream_channel_list_view.mdx). +For more information see the [`StreamChannelListView` documentation](../../02-stream_chat_flutter/04-channel_list/stream_channel_list_view.mdx). ### ChannelsBloc to StreamChannelListController @@ -311,7 +311,7 @@ Version 4 of the Stream Chat Flutter packages introduces a new controller called - Load more data using `loadMore`. - Refresh data. -For more information see the [`StreamMessageSearchListView` documentation](../../03-stream_chat_flutter/stream_message_search_list_view.mdx). +For more information see the [`StreamMessageSearchListView` documentation](../../02-stream_chat_flutter/06-message_list/stream_message_search_list_view.mdx). ### MessageSearchBloc to StreamMessageSearchListController @@ -422,7 +422,7 @@ Version 4 of the Stream Chat Flutter packages introduces a new controller called - Set filters. - Refresh data. -For more information see the [`StreamUserListView` documentation](../../03-stream_chat_flutter/stream_user_list_view.mdx). +For more information see the [`StreamUserListView` documentation](../../02-stream_chat_flutter/09-user_list/stream_user_list_view.mdx). ### UsersBloc to StreamUserListController diff --git a/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_5_0.mdx b/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_5_0.mdx index 7f243b2a7..95eaaabf4 100644 --- a/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_5_0.mdx +++ b/docusaurus/docs/Flutter/05-guides/08-migrations/migration_guide_5_0.mdx @@ -39,7 +39,7 @@ This section highlights our efforts on Desktop (macOS, Windows, and Linux) and W ### Setup -See the [setup guide](../../03-stream_chat_flutter/setup.mdx) for platform specific instructions. +See the [setup guide](../../../../flutter_versioned_docs/version-5.x.x/03-stream_chat_flutter/setup.mdx) for platform specific instructions. ### Supporting Larger Screens @@ -50,7 +50,7 @@ We've added support for larger screens and have made changes to the UI to suppor Below is an example running on macOS, with a split-screen view showing channels on the left and messages on the right. -![MacOS split](../../assets/mac_os_split.png) +![MacOS split](../../../../flutter_versioned_docs/version-5.x.x/assets/mac_os_split.png) ### Native Platform Interactions @@ -106,13 +106,13 @@ For additional information, see [#1125](https://github.com/GetStream/stream-chat The `StreamMemberListView` and `StreamMemberGridView` widgets are new widgets that allow you to display a list of members in a channel. -Check out the dedicated [documentation](../../03-stream_chat_flutter/stream_member_list_view.mdx) for more information. +Check out the dedicated [documentation](../../../../flutter_versioned_docs/version-5.x.x/03-stream_chat_flutter/stream_member_list_view.mdx) for more information. ### Attachment Picker As part of the v5 release, we've refactored the `AttachmentPicker` to be more flexible and customizable. This allows you to use the `AttachmentPicker` in various ways and customize the UI to your liking. -Check out the dedicated [guide](../../02-customization/01-custom-widgets/05-customize_attachment_picker_modal.mdx) for more information. +Check out the dedicated [guide](../../../../flutter_versioned_docs/version-5.x.x/02-customization/01-custom-widgets/05-customize_attachment_picker_modal.mdx) for more information. ### Other Changes @@ -170,6 +170,6 @@ StreamImageAttachment( ) ``` -- Removed `StreamMessageInput.customOverlays` in favor of `StreamMessageInput.customAutocompleteTriggers`. Read the guide on [Adding Custom Autocomplete Triggers](../../02-customization/01-custom-widgets/06-autocomplete_triggers.mdx) to learn how to migrate your code. +- Removed `StreamMessageInput.customOverlays` in favor of `StreamMessageInput.customAutocompleteTriggers`. Read the guide on [Adding Custom Autocomplete Triggers](../../../../flutter_versioned_docs/version-5.x.x/02-customization/01-custom-widgets/06-autocomplete_triggers.mdx) to learn how to migrate your code. -- Removed the default emoji overlay picker. Read the guide on [Adding Custom Autocomplete Triggers](../../02-customization/01-custom-widgets/06-autocomplete_triggers.mdx) to learn how to migrate your code. +- Removed the default emoji overlay picker. Read the guide on [Adding Custom Autocomplete Triggers](../../../../flutter_versioned_docs/version-5.x.x/02-customization/01-custom-widgets/06-autocomplete_triggers.mdx) to learn how to migrate your code. diff --git a/docusaurus/docs/Flutter/05-guides/09-initialize_stream_chat_widget_tree.mdx b/docusaurus/docs/Flutter/05-guides/09-initialize_stream_chat_widget_tree.mdx index 0f1bd86f7..9207d4585 100644 --- a/docusaurus/docs/Flutter/05-guides/09-initialize_stream_chat_widget_tree.mdx +++ b/docusaurus/docs/Flutter/05-guides/09-initialize_stream_chat_widget_tree.mdx @@ -12,7 +12,7 @@ This guide demonstrates three alternative ways for you to initialize Stream Chat Before investigating potential solutions, let’s first take a look at the relevant Stream Chat widgets and classes. -Most of the Stream Chat Flutter UI widgets rely on having a [StreamChat](../../customization/stream_chat_and_theming/) ancestor in the widget tree. +Most of the Stream Chat Flutter UI widgets rely on having a [StreamChat](../02-stream_chat_flutter/stream_chat_and_theming.mdx) ancestor in the widget tree. The **StreamChat** widget is an [InheritedWidget](https://api.flutter.dev/flutter/widgets/InheritedWidget-class.html) that exposes the **StreamChatClient** through **BuildContext**. This widget also initializes the [StreamChatCore](../04-stream_chat_flutter_core/stream_chat_core.mdx) widget and the **StreamChatTheme**. From 3971d3412dddd794cbeeb99342d63329793effc1 Mon Sep 17 00:00:00 2001 From: Efthymis Sarmpanis Date: Thu, 4 Jan 2024 17:32:09 +0200 Subject: [PATCH 2/5] feat(doc): merge version policy and choose package pages into an Installation page --- .../{choose_package.mdx => installation.mdx} | 19 +++++++++++++++++- .../Flutter/01-basics/versioning_policy.mdx | 20 ------------------- 2 files changed, 18 insertions(+), 21 deletions(-) rename docusaurus/docs/Flutter/01-basics/{choose_package.mdx => installation.mdx} (68%) delete mode 100644 docusaurus/docs/Flutter/01-basics/versioning_policy.mdx diff --git a/docusaurus/docs/Flutter/01-basics/choose_package.mdx b/docusaurus/docs/Flutter/01-basics/installation.mdx similarity index 68% rename from docusaurus/docs/Flutter/01-basics/choose_package.mdx rename to docusaurus/docs/Flutter/01-basics/installation.mdx index a192676ae..e32636fab 100644 --- a/docusaurus/docs/Flutter/01-basics/choose_package.mdx +++ b/docusaurus/docs/Flutter/01-basics/installation.mdx @@ -1,5 +1,5 @@ --- -id: choose_package +id: installation sidebar_position: 2 title: Installation --- @@ -55,3 +55,20 @@ and architecture. Summary: For the most control over the SDK and dealing with low level calls to the API, use `stream_chat`. + +### Versioning Policy + +All of the Stream Chat packages follow [semantic versioning](https://semver.org/). + +That means that with a version number x.y.z (major.minor.patch): +- When releasing bug fixes (backwards compatible), we make a patch release by changing the z number (ex: 3.6.2 to 3.6.3). A bug fix is defined as an internal change that fixes incorrect behavior. +- When releasing new features or non-critical fixes, we make a minor release by changing the y number (ex: 3.6.2 to 3.7.0). +- When releasing breaking changes (backward incompatible), we make a major release by changing the x number (ex: 3.6.2 to 4.0.0). + +See the [semantic versioning](https://dart.dev/tools/pub/versioning#semantic-versions) section from the Dart docs for more information. + +This versioning policy does not apply to prerelease packages (below major version of 1). See this +[StackOverflow thread](https://stackoverflow.com/questions/66201337/how-do-dart-package-versions-work-how-should-i-version-my-flutter-plugins) +for more information on Dart package versioning. + +Whenever possible, we will add deprecation warnings in preparation for future breaking changes. \ No newline at end of file diff --git a/docusaurus/docs/Flutter/01-basics/versioning_policy.mdx b/docusaurus/docs/Flutter/01-basics/versioning_policy.mdx deleted file mode 100644 index 99ec8111d..000000000 --- a/docusaurus/docs/Flutter/01-basics/versioning_policy.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -id: versioning_policy -sidebar_position: 3 -title: Versioning Policy ---- - -All of the Stream Chat packages follow [semantic versioning](https://semver.org/). - -That means that with a version number x.y.z (major.minor.patch): -- When releasing bug fixes (backwards compatible), we make a patch release by changing the z number (ex: 3.6.2 to 3.6.3). A bug fix is defined as an internal change that fixes incorrect behavior. -- When releasing new features or non-critical fixes, we make a minor release by changing the y number (ex: 3.6.2 to 3.7.0). -- When releasing breaking changes (backward incompatible), we make a major release by changing the x number (ex: 3.6.2 to 4.0.0). - -See the [semantic versioning](https://dart.dev/tools/pub/versioning#semantic-versions) section from the Dart docs for more information. - -This versioning policy does not apply to prerelease packages (below major version of 1). See this -[StackOverflow thread](https://stackoverflow.com/questions/66201337/how-do-dart-package-versions-work-how-should-i-version-my-flutter-plugins) -for more information on Dart package versioning. - -Whenever possible, we will add deprecation warnings in preparation for future breaking changes. From c767fa0c3bdceeef55a9d81fe3a3996eed7d00c5 Mon Sep 17 00:00:00 2001 From: Efthymis Sarmpanis Date: Thu, 4 Jan 2024 17:58:24 +0200 Subject: [PATCH 3/5] chore(ci): remove unused action --- .github/workflows/dispatch_workflows.yml | 32 ------------------------ 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/dispatch_workflows.yml diff --git a/.github/workflows/dispatch_workflows.yml b/.github/workflows/dispatch_workflows.yml deleted file mode 100644 index f5a67b922..000000000 --- a/.github/workflows/dispatch_workflows.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: dispatch_workflows - -env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - -on: - push: - tags: - - '*.*.*' - - 'v*.*.*' - branches: - - master - -jobs: - dispatch_nightly: - if: github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - steps: - - uses: benc-uk/workflow-dispatch@v121 - with: - workflow: build_nightly - repo: GetStream/flutter-samples - token: ${{ secrets.GH_TOKEN }} - dispatch_stable: - if: github.ref == 'refs/tags/*.*.*' - runs-on: ubuntu-latest - steps: - - uses: benc-uk/workflow-dispatch@v121 - with: - repo: GetStream/flutter-samples - workflow: build - token: ${{ secrets.GH_TOKEN }} From 555933936424d6c8037f55dd30e790edfbbf2be7 Mon Sep 17 00:00:00 2001 From: Efthymis Sarmpanis Date: Tue, 9 Jan 2024 16:20:55 +0200 Subject: [PATCH 4/5] chore(repo): update SDK dependencies in all example projects --- .../stream_chat/example/android/app/build.gradle | 2 +- packages/stream_chat/example/android/build.gradle | 2 +- .../example/ios/Flutter/AppFrameworkInfo.plist | 2 +- .../example/ios/Runner.xcodeproj/project.pbxproj | 13 ++++++++----- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- packages/stream_chat/example/ios/Runner/Info.plist | 4 ++++ packages/stream_chat/example/pubspec.yaml | 2 +- .../example/android/build.gradle | 4 ++-- packages/stream_chat_flutter/example/pubspec.yaml | 6 +++--- .../example/android/app/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/ios/Flutter/AppFrameworkInfo.plist | 2 +- .../example/ios/Runner.xcodeproj/project.pbxproj | 13 ++++++++----- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/ios/Runner/Info.plist | 4 ++++ .../stream_chat_flutter_core/example/pubspec.yaml | 2 +- .../example/android/build.gradle | 4 ++-- .../example/ios/Flutter/AppFrameworkInfo.plist | 2 +- .../example/ios/Runner.xcodeproj/project.pbxproj | 13 ++++++++----- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/ios/Runner/Info.plist | 4 ++++ .../stream_chat_localizations/example/pubspec.yaml | 4 ++-- .../example/android/build.gradle | 2 +- .../example/ios/Flutter/AppFrameworkInfo.plist | 2 +- .../example/ios/Runner.xcodeproj/project.pbxproj | 13 ++++++++----- .../project.xcworkspace/contents.xcworkspacedata | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/ios/Runner/Info.plist | 4 ++++ .../stream_chat_persistence/example/pubspec.yaml | 4 ++-- 29 files changed, 75 insertions(+), 47 deletions(-) diff --git a/packages/stream_chat/example/android/app/build.gradle b/packages/stream_chat/example/android/app/build.gradle index 778f092c1..060bf35a0 100644 --- a/packages/stream_chat/example/android/app/build.gradle +++ b/packages/stream_chat/example/android/app/build.gradle @@ -39,7 +39,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.example" - minSdkVersion 16 + minSdkVersion flutter.minSdkVersion targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/packages/stream_chat/example/android/build.gradle b/packages/stream_chat/example/android/build.gradle index 4ccde1b74..c743dd2ba 100644 --- a/packages/stream_chat/example/android/build.gradle +++ b/packages/stream_chat/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/stream_chat/example/ios/Flutter/AppFrameworkInfo.plist b/packages/stream_chat/example/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f78a..4f8d4d245 100644 --- a/packages/stream_chat/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/stream_chat/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 11.0 diff --git a/packages/stream_chat/example/ios/Runner.xcodeproj/project.pbxproj b/packages/stream_chat/example/ios/Runner.xcodeproj/project.pbxproj index 1aec2aa07..757c280aa 100644 --- a/packages/stream_chat/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/stream_chat/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -127,7 +127,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -171,10 +171,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -185,6 +187,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -272,7 +275,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -354,7 +357,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -403,7 +406,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/packages/stream_chat/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/stream_chat/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140cfd..b52b2e698 100644 --- a/packages/stream_chat/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/stream_chat/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/packages/stream_chat/example/pubspec.yaml b/packages/stream_chat/example/pubspec.yaml index 7530a44fa..151ac9d99 100644 --- a/packages/stream_chat/example/pubspec.yaml +++ b/packages/stream_chat/example/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: cupertino_icons: ^1.0.5 flutter: sdk: flutter - stream_chat: ^6.4.0 + stream_chat: ^7.0.1 flutter: uses-material-design: true diff --git a/packages/stream_chat_flutter/example/android/build.gradle b/packages/stream_chat_flutter/example/android/build.gradle index c3181f2ef..72082e1df 100644 --- a/packages/stream_chat_flutter/example/android/build.gradle +++ b/packages/stream_chat_flutter/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.7.21' + ext.kotlin_version = '1.9.22' repositories { google() jcenter() @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/stream_chat_flutter/example/pubspec.yaml b/packages/stream_chat_flutter/example/pubspec.yaml index cfe3882cf..bfed92434 100644 --- a/packages/stream_chat_flutter/example/pubspec.yaml +++ b/packages/stream_chat_flutter/example/pubspec.yaml @@ -13,9 +13,9 @@ dependencies: flutter: sdk: flutter responsive_builder: ^0.7.0 - stream_chat_flutter: ^6.4.0 - stream_chat_localizations: ^5.4.0 - stream_chat_persistence: ^6.4.0 + stream_chat_flutter: ^7.0.1 + stream_chat_localizations: ^7.0.1 + stream_chat_persistence: ^7.0.1 flutter: uses-material-design: true diff --git a/packages/stream_chat_flutter_core/example/android/app/build.gradle b/packages/stream_chat_flutter_core/example/android/app/build.gradle index 7143d984c..2e0efa555 100644 --- a/packages/stream_chat_flutter_core/example/android/app/build.gradle +++ b/packages/stream_chat_flutter_core/example/android/app/build.gradle @@ -34,7 +34,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "example.example" - minSdkVersion 16 + minSdkVersion flutter.minSdkVersion targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/packages/stream_chat_flutter_core/example/android/build.gradle b/packages/stream_chat_flutter_core/example/android/build.gradle index 4ccde1b74..c743dd2ba 100644 --- a/packages/stream_chat_flutter_core/example/android/build.gradle +++ b/packages/stream_chat_flutter_core/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/stream_chat_flutter_core/example/ios/Flutter/AppFrameworkInfo.plist b/packages/stream_chat_flutter_core/example/ios/Flutter/AppFrameworkInfo.plist index f2872cf47..4f8d4d245 100644 --- a/packages/stream_chat_flutter_core/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/stream_chat_flutter_core/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/project.pbxproj b/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/project.pbxproj index b55c0437c..e914b29b5 100644 --- a/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -200,10 +200,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -236,6 +238,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -340,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -429,7 +432,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -478,7 +481,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6e1..b52b2e698 100644 --- a/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/stream_chat_flutter_core/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/packages/stream_chat_flutter_core/example/pubspec.yaml b/packages/stream_chat_flutter_core/example/pubspec.yaml index 513f58bbd..320836850 100644 --- a/packages/stream_chat_flutter_core/example/pubspec.yaml +++ b/packages/stream_chat_flutter_core/example/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat_flutter_core: ^6.4.0 + stream_chat_flutter_core: ^7.0.1 flutter: uses-material-design: true diff --git a/packages/stream_chat_localizations/example/android/build.gradle b/packages/stream_chat_localizations/example/android/build.gradle index c3181f2ef..72082e1df 100644 --- a/packages/stream_chat_localizations/example/android/build.gradle +++ b/packages/stream_chat_localizations/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.7.21' + ext.kotlin_version = '1.9.22' repositories { google() jcenter() @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/stream_chat_localizations/example/ios/Flutter/AppFrameworkInfo.plist b/packages/stream_chat_localizations/example/ios/Flutter/AppFrameworkInfo.plist index 8d4492f97..9625e105d 100644 --- a/packages/stream_chat_localizations/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/stream_chat_localizations/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/project.pbxproj b/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/project.pbxproj index 52fdc7407..b627d1795 100644 --- a/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -200,10 +200,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -231,6 +233,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -340,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -414,7 +417,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -463,7 +466,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6e1..b52b2e698 100644 --- a/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/stream_chat_localizations/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/packages/stream_chat_localizations/example/pubspec.yaml b/packages/stream_chat_localizations/example/pubspec.yaml index 6b3df4750..053ffeee5 100644 --- a/packages/stream_chat_localizations/example/pubspec.yaml +++ b/packages/stream_chat_localizations/example/pubspec.yaml @@ -12,8 +12,8 @@ dependencies: cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat_flutter: ^6.4.0 - stream_chat_localizations: ^5.4.0 + stream_chat_flutter: ^7.0.1 + stream_chat_localizations: ^7.0.1 flutter: uses-material-design: true \ No newline at end of file diff --git a/packages/stream_chat_persistence/example/android/build.gradle b/packages/stream_chat_persistence/example/android/build.gradle index aa361aa0d..6571f4e39 100644 --- a/packages/stream_chat_persistence/example/android/build.gradle +++ b/packages/stream_chat_persistence/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/stream_chat_persistence/example/ios/Flutter/AppFrameworkInfo.plist b/packages/stream_chat_persistence/example/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f78a..4f8d4d245 100644 --- a/packages/stream_chat_persistence/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/stream_chat_persistence/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 11.0 diff --git a/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.pbxproj b/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.pbxproj index 261aa5a82..6a1bdfa48 100644 --- a/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -200,10 +200,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -214,6 +216,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -340,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -422,7 +425,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -471,7 +474,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16e..919434a62 100644 --- a/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140cfd..b52b2e698 100644 --- a/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/stream_chat_persistence/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/packages/stream_chat_persistence/example/pubspec.yaml b/packages/stream_chat_persistence/example/pubspec.yaml index b6e4783a4..fcb734c91 100644 --- a/packages/stream_chat_persistence/example/pubspec.yaml +++ b/packages/stream_chat_persistence/example/pubspec.yaml @@ -11,8 +11,8 @@ dependencies: cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat: ^6.4.0 - stream_chat_persistence: ^6.4.0 + stream_chat: ^7.0.1 + stream_chat_persistence: ^7.0.1 flutter: uses-material-design: true \ No newline at end of file From 1d1acdc9ae69138dfc16f745183c5373915cc080 Mon Sep 17 00:00:00 2001 From: Efthymis Sarmpanis Date: Fri, 2 Feb 2024 14:53:33 +0200 Subject: [PATCH 5/5] fix(llc): delete image and file attachments from the CDN, when the message get's hard deleted --- packages/stream_chat/CHANGELOG.md | 7 ++++ .../stream_chat/lib/src/client/channel.dart | 12 ++++++ .../test/src/client/channel_test.dart | 41 +++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 00c1b1b68..07314700e 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -1,3 +1,10 @@ +## Unreleased + +🐞 Fixed + +- [[#1837]](https://github.com/GetStream/stream-chat-flutter/issues/1837) Delete image and file + attachments from the CDN, when the message get's hard deleted. + ## 7.0.1 🐞 Fixed diff --git a/packages/stream_chat/lib/src/client/channel.dart b/packages/stream_chat/lib/src/client/channel.dart index 7ffd8a8af..516cbb985 100644 --- a/packages/stream_chat/lib/src/client/channel.dart +++ b/packages/stream_chat/lib/src/client/channel.dart @@ -862,6 +862,18 @@ class Channel { state?.deleteMessage(deletedMessage, hardDelete: hard); + if (hard) { + deletedMessage.attachments.forEach((attachment) { + if (attachment.uploadState.isSuccess) { + if (attachment.type == AttachmentType.image) { + deleteImage(attachment.imageUrl!); + } else if (attachment.type == AttachmentType.file) { + deleteFile(attachment.assetUrl!); + } + } + }); + } + return response; } catch (e) { if (e is StreamChatNetworkError && e.isRetriable) { diff --git a/packages/stream_chat/test/src/client/channel_test.dart b/packages/stream_chat/test/src/client/channel_test.dart index 17cb7679a..9db275f4e 100644 --- a/packages/stream_chat/test/src/client/channel_test.dart +++ b/packages/stream_chat/test/src/client/channel_test.dart @@ -772,6 +772,47 @@ void main() { verify(() => client.deleteMessage(messageId)).called(1); }); + test('should delete attachments for hard delete', () async { + final attachments = List.generate( + 3, + (index) => Attachment( + id: 'test-attachment-id-$index', + type: index.isEven ? 'image' : 'file', + file: AttachmentFile(size: index * 33, path: 'test-file-path'), + imageUrl: index.isEven ? 'test-image-url-$index' : null, + assetUrl: index.isOdd ? 'test-asset-url-$index' : null, + uploadState: const UploadState.success(), + ), + ); + const messageId = 'test-message-id'; + final message = Message( + attachments: attachments, + id: messageId, + createdAt: DateTime.now(), + state: MessageState.sent, + ); + + when(() => client.deleteMessage(messageId, hard: true)) + .thenAnswer((_) async => EmptyResponse()); + + when(() => client.deleteImage(any(), channelId, channelType)) + .thenAnswer((_) async => EmptyResponse()); + + when(() => client.deleteFile(any(), channelId, channelType)) + .thenAnswer((_) async => EmptyResponse()); + + final res = await channel.deleteMessage(message, hard: true); + + expect(res, isNotNull); + + verify(() => client.deleteMessage(messageId, hard: true)).called(1); + verify(() => client.deleteImage( + any(), + channelId, + channelType, + )).called(2); + }); + test( '''should directly update the state with message as deleted if the state is sending or failed''', () async {