Skip to content

Commit

Permalink
Merge pull request #37 from sendbird/release/3.18.0
Browse files Browse the repository at this point in the history
3.18.0
  • Loading branch information
sendbird-sdk-deployment authored Jun 20, 2024
2 parents f0a101b + 3632621 commit d7deb36
Show file tree
Hide file tree
Showing 196 changed files with 1,079 additions and 1,012 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Changelog
### v3.18.0 (Jun 20, 2024) with Chat SDK `v4.16.4`
* Updated dependencies
* update compileSdkVersion to 34
* [Gradle Plugin] Gradle 8.6
* [Gradle Plugin] Android Gradle Plugin 8.4.1
* Deprecated `enableReactionsSupergroup(Boolean)` in `ChannelConfig`, which is not allowed by default. If you wish to use this feature, [contact us](https://dashboard.sendbird.com/settings/contact_us?category=feedback_and_feature_requests&product=UIKit&subject=%5BFeature%20Request%5D%20Enable%20reactions%20for%20supergroup%20in%20UIKit).
* Added a new set of `color` resources for UIKit.
### v3.17.1 (Jun 7, 2024) with Chat SDK `v4.16.4`
* Fixed an intermittent crash due to variable initialization when entering a notification channel.
* Optimized ChatBot streaming message animation.### v3.17.0 (May 23, 2024) with Chat SDK `v4.16.3`
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ buildscript {
}
}
plugins {
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'com.android.application' version '8.4.1' apply false
id 'com.android.library' version '8.4.1' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'com.google.gms.google-services' version '4.3.15' apply false
}
8 changes: 7 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@ org.gradle.jvmargs=-Xmx1536m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

UIKIT_VERSION = 3.17.1
# for backwards compatibility
# (https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes?hl=en#default-changes)
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.enableR8.fullMode=false

UIKIT_VERSION = 3.18.0
UIKIT_VERSION_CODE = 1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon May 02 15:36:41 KST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
5 changes: 3 additions & 2 deletions uikit-samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ plugins {
version = UIKIT_VERSION
android {
namespace 'com.sendbird.uikit.samples'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "com.sendbird.uikit.samples"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName UIKIT_VERSION
multiDexEnabled true
Expand All @@ -29,6 +29,7 @@ android {
}
buildFeatures {
viewBinding true
buildConfig = true
}
}

Expand Down
2 changes: 1 addition & 1 deletion uikit-samples/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
android:resource="@drawable/icon_push_lollipop" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/primary_300" />
android:resource="@color/primary_main" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.sendbird.uikit.SendbirdUIKit
import com.sendbird.uikit.samples.R
import com.sendbird.uikit.samples.common.ThemeHomeActivity
import com.sendbird.uikit.samples.common.extensions.logout
import com.sendbird.uikit.samples.common.extensions.setTextColorResource
import com.sendbird.uikit.samples.common.preferences.PreferenceUtils
import com.sendbird.uikit.samples.common.widgets.WaitingDialog
import com.sendbird.uikit.samples.databinding.ActivityAiChatbotHomeBinding
Expand All @@ -20,6 +21,7 @@ class AIChatBotHomeActivity : ThemeHomeActivity() {

override fun applyTheme() {
super.applyTheme()
binding.mainTitle.setTextColorResource(if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis)
binding.btSignOut.setBackgroundResource(
if (isDarkTheme) R.drawable.selector_home_signout_button_dark
else R.drawable.selector_home_signout_button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class BasicHomeActivity : ThemeHomeActivity() {

override fun applyTheme() {
super.applyTheme()
binding.mainTitle.setTextColorResource(if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01)
binding.mainTitle.setTextColorResource(if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis)
binding.btSignOut.setBackgroundResource(
if (isDarkTheme) R.drawable.selector_home_signout_button_dark
else R.drawable.selector_home_signout_button
Expand Down Expand Up @@ -133,7 +133,7 @@ class BasicHomeActivity : ThemeHomeActivity() {
val dialog = builder.create()
dialog.show()
dialog.getButton(AlertDialog.BUTTON_POSITIVE)
.setTextColor(ContextCompat.getColor(this, com.sendbird.uikit.R.color.secondary_300))
.setTextColor(ContextCompat.getColor(this, com.sendbird.uikit.R.color.secondary_main))
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class OpenChannelMainActivity : AppCompatActivity() {
titleBar.setBackgroundResource(if (isDarkMode) R.color.background_500 else R.color.background_50)
titleBar.setTitleTextColor(
ResourcesCompat.getColor(
resources, if (isDarkMode) R.color.ondark_01 else R.color.onlight_01, null
resources, if (isDarkMode) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis, null
)
)
description.setTextColor(
ResourcesCompat.getColor(
resources, if (isDarkMode) R.color.ondark_02 else R.color.onlight_02, null
resources, if (isDarkMode) R.color.ondark_text_mid_emphasis else R.color.onlight_text_mid_emphasis, null
)
)
setSupportActionBar(titleBar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class LiveStreamListAdapter : OpenChannelListAdapter() {
with(binding) {
val isDark = PreferenceUtils.themeMode.isUsingDarkTheme()
background.setBackgroundResource(if (isDark) R.drawable.selector_list_background_dark else R.drawable.selector_list_background_light)
tvLiveTitle.setTextColorResource(if (isDark) R.color.ondark_01 else R.color.onlight_01)
tvCreator.setTextColorResource(if (isDark) R.color.ondark_02 else R.color.onlight_02)
tvBadge.setTextColorResource(if (isDark) R.color.ondark_02 else R.color.onlight_02)
tvLiveTitle.setTextColorResource(if (isDark) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis)
tvCreator.setTextColorResource(if (isDark) R.color.ondark_text_mid_emphasis else R.color.onlight_text_mid_emphasis)
tvBadge.setTextColorResource(if (isDark) R.color.ondark_text_mid_emphasis else R.color.onlight_text_mid_emphasis)
tvBadge.setBackgroundResource(if (isDark) R.drawable.shape_live_badge_dark else R.drawable.shape_live_badge_light)
}
}
Expand Down Expand Up @@ -68,7 +68,7 @@ class LiveStreamListAdapter : OpenChannelListAdapter() {
.diskCacheStrategy(DiskCacheStrategy.ALL)
.error(R.color.background_600)
.into(ivLiveThumbnail)
val iconTint = if (SendbirdUIKit.isDarkMode()) R.color.onlight_01 else R.color.ondark_01
val iconTint = if (SendbirdUIKit.isDarkMode()) R.color.onlight_text_high_emphasis else R.color.ondark_text_high_emphasis
val backgroundTint =
if (SendbirdUIKit.isDarkMode()) R.color.background_400 else R.color.background_300
val errorIcon = context.createOvalIcon(backgroundTint, R.drawable.icon_channels, iconTint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class SampleSettingsFragment : Fragment() {
text.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDark) R.color.primary_200 else R.color.primary_300,
if (isDark) R.color.primary_light else R.color.primary_main,
null
)
)
Expand Down Expand Up @@ -194,7 +194,7 @@ class SampleSettingsFragment : Fragment() {
val dialog = builder.create()
dialog.show()
dialog.getButton(AlertDialog.BUTTON_POSITIVE)
.setTextColor(ContextCompat.getColor(requireContext(), com.sendbird.uikit.R.color.secondary_300))
.setTextColor(ContextCompat.getColor(requireContext(), com.sendbird.uikit.R.color.secondary_main))
}

private fun initPage() {
Expand All @@ -208,22 +208,22 @@ class SampleSettingsFragment : Fragment() {
tvNickname.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01,
if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis,
null
)
)
idDivider.setBackgroundResource(if (isDarkTheme) R.drawable.sb_line_divider_dark else R.drawable.sb_line_divider_light)
tvUserIdBadge.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDarkTheme) R.color.ondark_02 else R.color.onlight_02,
if (isDarkTheme) R.color.ondark_text_mid_emphasis else R.color.onlight_text_mid_emphasis,
null
)
)
tvUserId.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01,
if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis,
null
)
)
Expand All @@ -232,7 +232,7 @@ class SampleSettingsFragment : Fragment() {
tvDarkThemeName.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01,
if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis,
null
)
)
Expand All @@ -241,7 +241,7 @@ class SampleSettingsFragment : Fragment() {
tvDisturbName.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01,
if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis,
null
)
)
Expand All @@ -250,7 +250,7 @@ class SampleSettingsFragment : Fragment() {
tvHomeName.setTextColor(
ResourcesCompat.getColor(
resources,
if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01,
if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis,
null
)
)
Expand Down Expand Up @@ -300,7 +300,7 @@ class SampleSettingsFragment : Fragment() {
Logger.d("++ dark theme clicked")
updateDarkTheme()
}
val disturbBackgroundTint = if (SendbirdUIKit.isDarkMode()) R.color.secondary_200 else R.color.secondary_300
val disturbBackgroundTint = if (SendbirdUIKit.isDarkMode()) R.color.secondary_light else R.color.secondary_main
binding.ivDisturbIcon.setImageDrawable(
requireContext().getDrawable(R.drawable.icon_notifications_filled, iconTint)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ class SelectServiceActivity : AppCompatActivity() {
val dialog = builder.create()
dialog.show()
dialog.getButton(AlertDialog.BUTTON_POSITIVE)
.setTextColor(ContextCompat.getColor(this@SelectServiceActivity, com.sendbird.uikit.R.color.secondary_300))
.setTextColor(ContextCompat.getColor(this@SelectServiceActivity, com.sendbird.uikit.R.color.secondary_main))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class MyFirebaseMessagingService : SendbirdPushHandler() {
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)
val notificationBuilder = NotificationCompat.Builder(context, channelId)
.setSmallIcon(R.drawable.icon_push_lollipop)
.setColor(ContextCompat.getColor(context, R.color.primary_300)) // small icon background color
.setColor(ContextCompat.getColor(context, R.color.primary_main)) // small icon background color
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.icon_push_oreo))
.setContentTitle(pushTitle)
.setAutoCancel(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FeedChannelListFragment : Fragment() {

SendbirdChat.appInfo?.notificationInfo?.feedChannels?.let { feedChannels ->
val background = if (themeMode == SendbirdUIKit.ThemeMode.Light) R.drawable.selector_rectangle_light else R.drawable.selector_rectangle_dark600
val dividerColor = if (themeMode == SendbirdUIKit.ThemeMode.Light) R.color.onlight_04 else R.color.ondark_04
val dividerColor = if (themeMode == SendbirdUIKit.ThemeMode.Light) R.color.onlight_text_disabled else R.color.ondark_text_disabled
val channelKeyStyle = if (themeMode == SendbirdUIKit.ThemeMode.Light) R.style.SendbirdSubtitle1OnLight01 else R.style.SendbirdSubtitle1OnDark01
val channelUrlStyle = if (themeMode == SendbirdUIKit.ThemeMode.Light) R.style.SendbirdBody3OnLight03 else R.style.SendbirdBody3OnDark03
feedChannels.entries.forEach { entry ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class NotificationHomeActivity : ThemeHomeActivity() {

override fun applyTheme() {
super.applyTheme()
binding.mainTitle.setTextColorResource(if (isDarkTheme) R.color.ondark_01 else R.color.onlight_01)
binding.mainTitle.setTextColorResource(if (isDarkTheme) R.color.ondark_text_high_emphasis else R.color.onlight_text_high_emphasis)
binding.btSignOut.setBackgroundResource(
if (isDarkTheme) R.drawable.selector_home_signout_button_dark
else R.drawable.selector_home_signout_button
Expand Down Expand Up @@ -88,6 +88,6 @@ class NotificationHomeActivity : ThemeHomeActivity() {
val dialog = builder.create()
dialog.show()
dialog.getButton(AlertDialog.BUTTON_POSITIVE)
.setTextColor(ContextCompat.getColor(this, com.sendbird.uikit.R.color.secondary_300))
.setTextColor(ContextCompat.getColor(this, com.sendbird.uikit.R.color.secondary_main))
}
}
4 changes: 2 additions & 2 deletions uikit-samples/src/main/res/color/selector_primary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="true"
android:color="@color/primary_400"/>
android:color="@color/primary_dark"/>

<item
android:state_pressed="false"
android:color="@color/primary_300"/>
android:color="@color/primary_main"/>
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<layer-list>
<item>
<shape android:shape="oval">
<solid android:color="@color/ondark_02"/>
<solid android:color="@color/ondark_text_mid_emphasis"/>
</shape>
</item>

Expand All @@ -23,7 +23,7 @@
<layer-list>
<item>
<shape android:shape="oval">
<solid android:color="@color/ondark_03"/>
<solid android:color="@color/ondark_text_low_emphasis"/>
</shape>
</item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<layer-list>
<item>
<shape android:shape="oval">
<solid android:color="@color/onlight_02"/>
<solid android:color="@color/onlight_text_mid_emphasis"/>
</shape>
</item>

Expand All @@ -23,7 +23,7 @@
<layer-list>
<item>
<shape android:shape="oval">
<solid android:color="@color/onlight_03"/>
<solid android:color="@color/onlight_text_low_emphasis"/>
</shape>
</item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/primary_500"/>
<solid android:color="@color/primary_extra_dark"/>
<corners android:radius="@dimen/sb_size_8"/>
</shape>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/sb_size_4"/>
<solid android:color="@color/primary_300"/>
<stroke android:color="@color/primary_400"
<solid android:color="@color/primary_main"/>
<stroke android:color="@color/primary_dark"
android:width="@dimen/sb_size_1"/>
</shape>
</item>
<item android:state_pressed="false">
<shape android:shape="rectangle">
<corners android:radius="@dimen/sb_size_4"/>
<stroke android:color="@color/primary_300"
<stroke android:color="@color/primary_main"
android:width="@dimen/sb_size_1"/>
<solid android:color="@color/primary_200"/>
<solid android:color="@color/primary_light"/>
</shape>
</item>
</selector>
4 changes: 2 additions & 2 deletions uikit-samples/src/main/res/drawable/selector_tab_tint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="true"
android:color="@color/primary_300"/>
android:color="@color/primary_main"/>

<item
android:color="@color/onlight_03"/>
android:color="@color/onlight_text_low_emphasis"/>
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="true"
android:color="@color/primary_200"/>
android:color="@color/primary_light"/>

<item
android:color="@color/ondark_03"/>
android:color="@color/ondark_text_low_emphasis"/>
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:shape="rectangle">

<solid
android:color="@color/error_300"/>
android:color="@color/error_main"/>

<corners
android:radius="@dimen/sb_size_20"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:shape="rectangle">

<solid
android:color="@color/error_200"/>
android:color="@color/error_light"/>

<corners
android:radius="@dimen/sb_size_20"/>
Expand Down
Loading

0 comments on commit d7deb36

Please sign in to comment.