Skip to content

Commit 24d86af

Browse files
Merge pull request #48 from sendbird/release/3.22.2
3.22.2
2 parents dc3b4c5 + 894ce3d commit 24d86af

File tree

4 files changed

+77
-17
lines changed

4 files changed

+77
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Changelog
2+
### v3.22.2 (Feb 28, 2025) with Chat SDK `v4.24.0`
3+
* Replaced `newIntent` methods, which had a channelUrl parameter, with one that does not include it. in `OpenChannelListActivity`
24
### v3.22.1 (Feb 20, 2025) with Chat SDK `v4.23.1`
35
* Fixed suggested replies not disappearing after sending a message.
46
* Fixed the mention list not showing up when typing a nickname.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ android.nonTransitiveRClass=false
2222
android.nonFinalResIds=false
2323
android.enableR8.fullMode=false
2424

25-
UIKIT_VERSION = 3.22.1
25+
UIKIT_VERSION = 3.22.2
2626
UIKIT_VERSION_CODE = 1

uikit/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dependencies {
7070
implementation fileTree(dir: 'libs', include: ['*.jar'])
7171

7272
// Sendbird
73-
api 'com.sendbird.sdk:sendbird-chat:4.23.1'
73+
api 'com.sendbird.sdk:sendbird-chat:4.24.0'
7474
implementation "com.sendbird.sdk:message-template:1.0.0"
7575

7676
implementation 'com.github.bumptech.glide:glide:4.16.0'

uikit/src/main/java/com/sendbird/uikit/activities/OpenChannelListActivity.java

Lines changed: 73 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ public class OpenChannelListActivity extends AppCompatActivity {
3030
* @param channelUrl the url of the channel will be implemented.
3131
* @return OpenChannelListActivity Intent.
3232
* since 3.2.0
33+
* @deprecated 3.22.2
34+
* <p> Use {@link OpenChannelListActivity#newIntent(Context)} instead.</p>
3335
*/
36+
@Deprecated
3437
@NonNull
3538
public static Intent newIntent(@NonNull Context context, @NonNull String channelUrl) {
36-
return newIntentFromCustomActivity(context, OpenChannelListActivity.class, channelUrl);
39+
return newIntentFromCustomActivity(context, OpenChannelListActivity.class);
3740
}
3841

3942
/**
@@ -44,10 +47,13 @@ public static Intent newIntent(@NonNull Context context, @NonNull String channel
4447
* @param themeResId the resource identifier for custom theme.
4548
* @return OpenChannelListActivity Intent.
4649
* since 3.5.6
50+
* @deprecated 3.22.2
51+
* <p> Use {@link OpenChannelListActivity#newIntent(Context, int)} instead.</p>
4752
*/
53+
@Deprecated
4854
@NonNull
4955
public static Intent newIntent(@NonNull Context context, @NonNull String channelUrl, @StyleRes int themeResId) {
50-
return newIntentFromCustomActivity(context, OpenChannelListActivity.class, channelUrl, themeResId);
56+
return newIntentFromCustomActivity(context, OpenChannelListActivity.class, themeResId);
5157
}
5258

5359
/**
@@ -58,10 +64,13 @@ public static Intent newIntent(@NonNull Context context, @NonNull String channel
5864
* @param channelUrl the url of the channel will be implemented.
5965
* @return Returns a newly created Intent that can be used to launch the activity.
6066
* since 3.2.0
67+
* @deprecated 3.22.2
68+
* <p> Use {@link OpenChannelListActivity#newIntentFromCustomActivity(Context, Class)} instead.</p>
6169
*/
70+
@Deprecated
6271
@NonNull
6372
public static Intent newIntentFromCustomActivity(@NonNull Context context, @NonNull Class<? extends OpenChannelListActivity> cls, @NonNull String channelUrl) {
64-
return newIntentFromCustomActivity(context, cls, channelUrl, SendbirdUIKit.getDefaultThemeMode().getResId());
73+
return newIntentFromCustomActivity(context, cls, SendbirdUIKit.getDefaultThemeMode().getResId());
6574
}
6675

6776
/**
@@ -73,11 +82,65 @@ public static Intent newIntentFromCustomActivity(@NonNull Context context, @NonN
7382
* @param themeResId the resource identifier for custom theme.
7483
* @return Returns a newly created Intent that can be used to launch the activity.
7584
* since 3.5.6
85+
* @deprecated 3.22.2
86+
* <p> Use {@link OpenChannelListActivity#newIntentFromCustomActivity(Context, Class, int)} instead.</p>
7687
*/
88+
@Deprecated
7789
@NonNull
7890
public static Intent newIntentFromCustomActivity(@NonNull Context context, @NonNull Class<? extends OpenChannelListActivity> cls, @NonNull String channelUrl, @StyleRes int themeResId) {
91+
return newIntentFromCustomActivity(context, cls, themeResId);
92+
}
93+
94+
/**
95+
* Create an intent for a {@link OpenChannelListActivity}.
96+
*
97+
* @param context A Context of the application package implementing this class.
98+
* @return OpenChannelListActivity Intent.
99+
* since 3.22.2
100+
*/
101+
@NonNull
102+
public static Intent newIntent(@NonNull Context context) {
103+
return newIntentFromCustomActivity(context, OpenChannelListActivity.class);
104+
}
105+
106+
/**
107+
* Create an intent for a {@link OpenChannelListActivity}.
108+
*
109+
* @param context A Context of the application package implementing this class.
110+
* @param themeResId the resource identifier for custom theme.
111+
* @return OpenChannelListActivity Intent.
112+
* since 3.22.2
113+
*/
114+
@NonNull
115+
public static Intent newIntent(@NonNull Context context, @StyleRes int themeResId) {
116+
return newIntentFromCustomActivity(context, OpenChannelListActivity.class, themeResId);
117+
}
118+
119+
/**
120+
* Create an intent for a custom activity. The custom activity must inherit {@link OpenChannelListActivity}.
121+
*
122+
* @param context A Context of the application package implementing this class.
123+
* @param cls The activity class that is to be used for the intent.
124+
* @return Returns a newly created Intent that can be used to launch the activity.
125+
* since 3.22.2
126+
*/
127+
@NonNull
128+
public static Intent newIntentFromCustomActivity(@NonNull Context context, @NonNull Class<? extends OpenChannelListActivity> cls) {
129+
return newIntentFromCustomActivity(context, cls, SendbirdUIKit.getDefaultThemeMode().getResId());
130+
}
131+
132+
/**
133+
* Create an intent for a custom activity. The custom activity must inherit {@link OpenChannelListActivity}.
134+
*
135+
* @param context A Context of the application package implementing this class.
136+
* @param cls The activity class that is to be used for the intent.
137+
* @param themeResId the resource identifier for custom theme.
138+
* @return Returns a newly created Intent that can be used to launch the activity.
139+
* since 3.22.2
140+
*/
141+
@NonNull
142+
public static Intent newIntentFromCustomActivity(@NonNull Context context, @NonNull Class<? extends OpenChannelListActivity> cls, @StyleRes int themeResId) {
79143
Intent intent = new Intent(context, cls);
80-
intent.putExtra(StringSet.KEY_CHANNEL_URL, channelUrl);
81144
intent.putExtra(StringSet.KEY_THEME_RES_ID, themeResId);
82145
return intent;
83146
}
@@ -89,17 +152,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
89152
setTheme(themeResId);
90153
setContentView(R.layout.sb_activity);
91154

92-
String url = getIntent().getStringExtra(StringSet.KEY_CHANNEL_URL);
93-
if (TextUtils.isEmpty(url)) {
94-
ContextUtils.toastError(this, R.string.sb_text_error_get_channel);
95-
} else {
96-
Fragment fragment = createFragment();
97-
FragmentManager manager = getSupportFragmentManager();
98-
manager.popBackStack();
99-
manager.beginTransaction()
100-
.replace(R.id.sb_fragment_container, fragment)
101-
.commit();
102-
}
155+
Fragment fragment = createFragment();
156+
FragmentManager manager = getSupportFragmentManager();
157+
manager.popBackStack();
158+
manager.beginTransaction()
159+
.replace(R.id.sb_fragment_container, fragment)
160+
.commit();
103161
}
104162

105163
/**

0 commit comments

Comments
 (0)