Skip to content

Commit

Permalink
Update Freshchat SDK version to 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BinduMCX committed Oct 9, 2023
1 parent c9ba857 commit 578b88c
Show file tree
Hide file tree
Showing 19 changed files with 209 additions and 15 deletions.
5 changes: 5 additions & 0 deletions freshchat_sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 6.0.0(2023-10-09)

### Enhancement :
* Performance improvement on loading messages

## 5.9.6(2023-10-06)

### Bug fix :
Expand Down
4 changes: 2 additions & 2 deletions freshchat_sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ android {

defaultConfig {
minSdkVersion 16
versionCode 596
versionName "5.9.6"
versionCode 600
versionName "6.0.0"
targetSdkVersion 31
consumerProguardFiles 'consumer-proguard-rules.pro'
buildConfigField "long", 'BUILT_AT', System.currentTimeMillis() + 'L'
Expand Down
Binary file modified freshchat_sdk/libs/freshchat.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<corners android:radius="4dp" />
<stroke
android:width="1dp"
android:color="#E1E2E6" />
android:color="@color/freshchat_calendar_button_stroke" />
<solid android:color="@color/freshchat_white" />

</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<corners android:radius="4dp" />
<stroke
android:width="1dp"
android:color="#E1E2E6" />
<solid android:color="#091E42" />
android:color="@color/freshchat_calendar_button_stroke" />
<solid android:color="@color/freshchat_calendar_timeslot_selected_state_button_solid" />

</shape>
9 changes: 9 additions & 0 deletions freshchat_sdk/src/main/res/drawable/freshchat_dotted_line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:width="1dp"
android:color="@color/freshchat_new_messages_divider"
android:dashWidth="1dp"
android:dashGap="3dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="100dp" />
<stroke
android:width="1dp"
android:color="@color/freshchat_new_messages_button_stroke" />
<solid android:color="@color/freshchat_white" />

</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,25 @@
android:layout_height="wrap_content"
android:visibility="gone" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/freshchat_conv_detail_list"
style="?attr/freshchatMessageListStyle"
<RelativeLayout
android:id="@+id/freshchat_conv_detail_root_layout"
android:layout_width="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:layout_height="0dp"
android:layout_weight="1" />
android:layout_weight="1">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/freshchat_conv_detail_list"
style="?attr/freshchatMessageListStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

<Button
android:id="@+id/freshchat_new_messages_count_btn"
style="?attr/freshchatNewMessageBubbleStyle"
android:visibility="gone" />

</RelativeLayout>

<include
android:id="@+id/freshchat_invalid_input_message"
Expand Down Expand Up @@ -78,7 +90,33 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />



<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="70dp"
android:layout_below = "@id/freshchat_conv_detail_root_layout"
android:elevation="@dimen/freshchat_message_composer_elevation"
android:visibility="gone"
android:id="@+id/freshchat_quick_reply_container"
android:background="?attr/freshchatQuickReplyViewBgColor">

<com.freshchat.consumer.sdk.ui.FlowLayout
android:id="@+id/freshchat_chips_flowlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingBottom="20dp"
android:paddingEnd="12dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingStart="12dp"
app:freshchatFlChildSpacing="@dimen/freshchat_quick_reply_view_row_padding"
app:freshchatFlChildSpacingForLastRow="align"
android:splitMotionEvents="false"
app:freshchatFlRowSpacing="@dimen/freshchat_quick_reply_view_column_padding" />
</ScrollView>
<include
layout="@layout/freshchat_bot_calendar_layout"
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
android:orientation="vertical">

<include
layout="@layout/freshchat_listitem_message"
layout="@layout/freshchat_list_item_with_new_message_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<com.freshchat.consumer.sdk.ui.FlowLayout
<com.freshchat.consumer.sdk.ui.FlowLayout
android:id="@+id/freshchat_chips_flowlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<include
android:id="@+id/freshchat_new_messages_divider_layout"
layout="@layout/freshchat_new_messages_divider"
android:visibility="gone" />

<include layout="@layout/freshchat_listitem_message"
style="?attr/freshchatMessageListItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

</androidx.appcompat.widget.LinearLayoutCompat>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- We can optimise if customer reaches out-->

<include
layout="@layout/freshchat_listitem_message"
layout="@layout/freshchat_list_item_with_new_message_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/freshchat_conversations_pagination_alert_view"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="@color/freshchat_load_messages_banner_color"
android:orientation="vertical">

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/freshchat_load_messages_text"
style="?attr/freshchatConversationsLoadingMessageTextStyle" />
</LinearLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/freshchat_new_messages_divider_left_right_margin"
android:paddingTop="@dimen/freshchat_new_messages_divider_top_margin"
android:paddingRight="@dimen/freshchat_new_messages_divider_left_right_margin"
android:paddingBottom="@dimen/freshchat_new_messages_divider_bottom_margin">

<View style="@style/Widget.Freshchat.DividerDottedLineView" />

<androidx.appcompat.widget.AppCompatTextView style="@style/Widget.Freshchat.NewMessagesDividerTextView" />

<View style="@style/Widget.Freshchat.DividerDottedLineView" />

</androidx.appcompat.widget.LinearLayoutCompat>
4 changes: 4 additions & 0 deletions freshchat_sdk/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@
<attr name="freshchatRatingTextStyle" format="reference"/>
<attr name="freshChatRatingBar" format="reference"/>

<!--Conversations Pagination-->
<attr name="freshchatConversationsLoadingMessageTextStyle" format="reference"/>
<attr name="freshchatNewMessageBubbleStyle" format="reference"/>

<!-- Country code-->
<attr name="freshchatSelectedCountryCode" format="reference" />
<attr name="freshchatCountryCodeDropdownIcon" format="reference" />
Expand Down
9 changes: 9 additions & 0 deletions freshchat_sdk/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

<color name="freshchat_message_unknown_bg_stoke">#26091E42</color>
<color name="freshchat_message_unknown_bg_solid">#B0FFFFFF</color>
<color name="freshchat_button_stroke">#E1E2E6</color>

<!--Quick replies-->
<color name="freshchat_quick_reply_chip_bg">@color/freshchat_white</color>
Expand Down Expand Up @@ -149,6 +150,8 @@
<color name="freshchat_calendar_event_card_text">@color/freshchat_calendar_primary_text_color</color>
<color name="freshchat_calendar_event_card_bg">@android:color/transparent</color>
<color name="freshchat_calendar_meeting_banner_color">#243756</color>
<color name="freshchat_calendar_button_stroke">@color/freshchat_button_stroke</color>
<color name="freshchat_calendar_timeslot_selected_state_button_solid">#091E42</color>
<color name="freshchat_invalid_input_alert">#FEF1E1</color>
<color name="freshchat_invalid_input_alert_divider">#FAC386</color>
<color name="freshchat_invalid_input_alert_text">#C82124</color>
Expand All @@ -172,6 +175,11 @@
<color name="freshchat_faq_progress_color">@color/freshchat_carousel_card_btn_text</color>
<color name="freshchat_faq_pagination_error_with_retry_text">@color/freshchat_grey_darkest</color>

<!-- Conversation Pagination -->
<color name="freshchat_load_messages_banner_color">@color/freshchat_white</color>
<color name="freshchat_new_messages_count_text">#293B5B</color>
<color name="freshchat_new_messages_button_stroke">@color/freshchat_button_stroke</color>
<color name="freshchat_load_messages_indicator_text_color">#3C3C43</color>
<!-- Quick Actions-->
<color name="freshchat_quick_actions_menu_popup">@color/freshchat_white</color>
<color name="freshchat_quick_actions_slash_command_popup">@color/freshchat_white</color>
Expand All @@ -189,6 +197,7 @@
<color name="freshchat_send_button_background_color">#12344D</color>
<color name="freshchat_attachment_file_size">#475867</color>
<color name="freshchat_alert_dialog_message">#12344D</color>
<color name="freshchat_new_messages_divider">@color/freshchat_grey_darkest</color>

<!-- Phone country code-->
<color name="freshchat_no_search_results_text">#475867</color>
Expand Down
4 changes: 4 additions & 0 deletions freshchat_sdk/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
<!-- Attachments -->
<dimen name="freshchat_partial_image_attachment_padding">16dp</dimen>

<!-- Conversation Pagination -->
<dimen name="freshchat_new_messages_divider_left_right_margin">8dp</dimen>
<dimen name="freshchat_new_messages_divider_top_margin">14dp</dimen>
<dimen name="freshchat_new_messages_divider_bottom_margin">6dp</dimen>
<dimen name="freshchat_bottom_sheet_margin">70dp</dimen>
<dimen name="freshchat_bottom_sheet_corner_radius">10dp</dimen>

Expand Down
9 changes: 8 additions & 1 deletion freshchat_sdk/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,15 @@
<string name="freshchat_no_faq_found">No FAQ found</string>
<string name="freshchat_minimum_search_criteria">Enter 3 or more characters to search</string>
<string name="freshchat_pagination_error_with_retry">Failed to load. Tap to retry.</string>
<string name="freshchat_pagination_no_internet_with_retry">No internet connection. Tap to retry.</string>

<!-- Conversation Pagination -->
<string name="freshchat_new_messages">New Messages</string>
<string name="freshchat_loading_more_messages">Loading more...</string>
<string name="freshchat_loading_more_messages_failed">Failed to load</string>
<plurals name="freshchat_new_messages_count">
<item quantity="one">New Message</item>
<item quantity="other">@string/freshchat_new_messages</item>
</plurals>
<!--Bots-->
<string name="freshchat_bot_faq_feedback_title">Was this answer useful?</string>
<string name="freshchat_bot_faq_feedback_success">Thank you for your Feedback!</string>
Expand Down
57 changes: 57 additions & 0 deletions freshchat_sdk/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@

<style name="Widget.Freshchat.MessageListItem">
<item name="android:background">@color/freshchat_message_list_item_bg</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginLeft">4dp</item>
<item name="android:layout_marginStart">4dp</item>
<item name="android:layout_marginRight">4dp</item>
<item name="android:layout_marginEnd">4dp</item>
</style>

<style name="Widget.Freshchat.MessageButton" parent="Widget.AppCompat.Button">
Expand Down Expand Up @@ -1235,6 +1240,48 @@

<!-- Calendar styles - End -->

<!-- Conversation Pagination -->

<style name="Widget.Freshchat.NewMessagesCountButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:minWidth">120dp</item>
<item name="android:minHeight">30dp</item>
<item name="android:outlineProvider">none</item>
<item name="android:textAllCaps">false</item>
<item name="android:textColor">@color/freshchat_new_messages_count_text</item>
<item name="android:background">@drawable/freshchat_new_messages_button_bg</item>
<item name="android:textSize">12sp</item>
<item name="android:padding">8dp</item>
<item name="android:focusable">true</item>
<item name="android:layout_alignParentBottom">true</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:textDirection">firstStrong</item>
<item name="android:layout_marginBottom">8dp</item>
</style>

<style name="Widget.Freshchat.DividerDottedLineView">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">3dp</item>
<item name="android:layout_weight">1</item>
<item name="android:background">@drawable/freshchat_dotted_line</item>
<item name="android:layerType">software</item>
</style>

<style name="Widget.Freshchat.NewMessagesDividerTextView">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginStart">16dp</item>
<item name="android:layout_marginLeft">16dp</item>
<item name="android:layout_marginEnd">16dp</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:text">@string/freshchat_new_messages</item>
<item name="android:textColor">@color/freshchat_new_messages_divider</item>
</style>

<!-- Conversation Pagination - End -->


<!-- Common -->
<style name="Widget.Freshchat.ContactUs">
<item name="android:textAppearance">@style/TextAppearance.Freshchat.Medium</item>
Expand Down Expand Up @@ -1320,6 +1367,16 @@
<item name="elevation">8dp</item>
</style>

<style name="Widget.Freshchat.ConversationsLoadMoreMessageText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/freshchat_load_messages_indicator_text_color</item>
<item name="android:textSize">15sp</item>
<item name="android:layout_gravity">center</item>
<item name="android:layout_marginTop">15dp</item>
<item name="android:layout_marginBottom">15dp</item>
</style>

<style name="Widget.Freshchat.CountTrackerSubmitButtonStyle">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
Expand Down
4 changes: 4 additions & 0 deletions freshchat_sdk/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<item name="freshchatMessageListStyle">@style/Widget.Freshchat.MessageList</item>
<item name="freshchatMessageListItemStyle">@style/Widget.Freshchat.MessageListItem</item>
<item name="freshchatMessageReplyViewStyle">@style/Widget.Freshchat.MessageReplyView</item>
<item name="freshchatNewMessageBubbleStyle">@style/Widget.Freshchat.NewMessagesCountButton</item>
<item name="freshchatMessageBotReplyViewStyle">@style/Widget.Freshchat.MessageReplyWithAttachmentView</item>

<item name="freshchatQuickReplyTextStyle">@style/Widget.Freshchat.QuickReplyText</item>
Expand Down Expand Up @@ -219,6 +220,7 @@

<!-- Misc Styles -->
<item name="freshchatContactUsTextStyle">@style/Widget.Freshchat.ContactUs</item>
<item name="freshchatConversationsLoadingMessageTextStyle">@style/Widget.Freshchat.ConversationsLoadMoreMessageText</item>

<!-- Quick Action Menu -->
<item name="freshchatQuickActionMenuStyle">@style/Widget.Freshchat.QuickActions.Background</item>
Expand Down Expand Up @@ -377,6 +379,7 @@
<item name="freshchatMessageReplyInputViewStyle">@style/Widget.Freshchat.MessageReplyEditText</item>
<item name="freshchatMessageReplyWithAttachmentInputViewStyle">@style/Widget.Freshchat.MessageReplyWithAttachmentTextView</item>
<item name="freshchatConversationBannerMessageStyle">@style/Widget.Freshchat.ConversationBannerMessage</item>
<item name="freshchatNewMessageBubbleStyle">@style/Widget.Freshchat.NewMessagesCountButton</item>
<item name="freshchatProgressBarStyle">@style/Widget.Freshchat.ProgressBar</item>
<item name="freshchatQuickReplyLastButtonViewStyle">@drawable/freshchat_ic_more_button</item>
<item name="freshchatQuickReplyLastButtonBgViewStyle">@drawable/freshchat_last_btn_flow_layout</item>
Expand Down Expand Up @@ -514,6 +517,7 @@

<!-- Misc Styles -->
<item name="freshchatContactUsTextStyle">@style/Widget.Freshchat.ContactUs</item>
<item name="freshchatConversationsLoadingMessageTextStyle">@style/Widget.Freshchat.ConversationsLoadMoreMessageText</item>

<item name="freshchatQuickActionMenuStyle">@style/Widget.Freshchat.QuickActions.Background</item>

Expand Down

0 comments on commit 578b88c

Please sign in to comment.