Skip to content

Commit 54b4a7a

Browse files
Merge pull request #17 from sendbird/release/3.9.3
3.9.3
2 parents 52ad84d + a5fa5cb commit 54b4a7a

32 files changed

+130
-71
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2+
### v3.9.3 (Oct 26, 2023) with Chat SDK `v4.13.0`
3+
* Improve stability.
4+
25
### v3.9.2 (Oct 12, 2023) with Chat SDK `v4.12.3`
36
* Added `setVoiceRecorderConfig(VoiceRecorderConfig)` and `getVoiceRecorderConfig()` in `SendbirdUIKit`.
47
* Added `setOnEmojiReactionUserListProfileClickListener(OnItemClickListener<User>)` in `ChannelFragment.Builder` and `MessageThreadFragment.Builder`.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ org.gradle.jvmargs=-Xmx1536m
1616
# https://developer.android.com/topic/libraries/support-library/androidx-rn
1717
android.useAndroidX=true
1818

19-
UIKIT_VERSION = 3.9.2
19+
UIKIT_VERSION = 3.9.3
2020
UIKIT_VERSION_CODE = 1

uikit/build.gradle

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

6666
// Sendbird
67-
api 'com.sendbird.sdk:sendbird-chat:4.12.3'
67+
api 'com.sendbird.sdk:sendbird-chat:4.13.0'
6868

6969
implementation 'com.github.bumptech.glide:glide:4.13.0'
7070
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'

uikit/src/main/java/com/sendbird/uikit/fragments/BannedUserListFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public static class Builder {
273273
* @param channelUrl the url of the channel will be implemented.
274274
*/
275275
public Builder(@NonNull String channelUrl) {
276-
this(channelUrl, SendbirdUIKit.getDefaultThemeMode());
276+
this(channelUrl, 0);
277277
}
278278

279279
/**
@@ -294,7 +294,9 @@ public Builder(@NonNull String channelUrl, @NonNull SendbirdUIKit.ThemeMode them
294294
*/
295295
public Builder(@NonNull String channelUrl, @StyleRes int customThemeResId) {
296296
bundle = new Bundle();
297-
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
297+
if (customThemeResId != 0) {
298+
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
299+
}
298300
bundle.putString(StringSet.KEY_CHANNEL_URL, channelUrl);
299301
}
300302

uikit/src/main/java/com/sendbird/uikit/fragments/BaseMessageListFragment.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -436,21 +436,16 @@ void showConfirmDialog(@NonNull String message) {
436436
}
437437

438438
void showEmojiActionsDialog(@NonNull BaseMessage message, @NonNull DialogListItem[] actions) {
439-
if (getContext() == null) {
440-
return;
441-
}
442-
439+
boolean showMoreButton = false;
443440
List<Emoji> emojiList = EmojiManager.getAllEmojis();
444-
445441
int shownEmojiSize = emojiList.size();
446-
boolean showMoreButton = false;
447442
if (emojiList.size() > 6) {
448443
showMoreButton = true;
449444
shownEmojiSize = 5;
450445
}
451446
emojiList = emojiList.subList(0, shownEmojiSize);
452447

453-
final Context contextThemeWrapper = ContextUtils.extractModuleThemeContext(getContext(), getModule().getParams().getTheme(), R.attr.sb_component_list);
448+
final Context contextThemeWrapper = ContextUtils.extractModuleThemeContext(requireContext(), getModule().getParams().getTheme(), R.attr.sb_component_list);
454449
final EmojiListView emojiListView = EmojiListView.create(contextThemeWrapper, emojiList, message.getReactions(), showMoreButton);
455450
hideKeyboard();
456451
if (actions.length > 0 || emojiList.size() > 0) {
@@ -502,7 +497,7 @@ private static Map<Reaction, List<User>> getReactionUserInfo(@NonNull GroupChann
502497
return result;
503498
}
504499

505-
private void hideKeyboard() {
500+
void hideKeyboard() {
506501
if (getView() != null) {
507502
SoftInputUtils.hideSoftKeyboard(getView());
508503
}

uikit/src/main/java/com/sendbird/uikit/fragments/ChannelFragment.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import androidx.annotation.StyleRes;
1818
import androidx.recyclerview.widget.LinearLayoutManager;
1919
import androidx.recyclerview.widget.RecyclerView;
20+
2021
import com.sendbird.android.channel.GroupChannel;
2122
import com.sendbird.android.channel.Role;
2223
import com.sendbird.android.message.BaseMessage;
@@ -708,15 +709,16 @@ void showMessageContextMenu(@NonNull View anchorView, @NonNull BaseMessage messa
708709
final DialogListItem[] actions = items.toArray(new DialogListItem[size]);
709710
if (getViewModel().getChannel() != null && !(ChannelConfig.canSendReactions(channelConfig, getViewModel().getChannel()))) {
710711
final RecyclerView messageListView = getModule().getMessageListComponent().getRecyclerView();
711-
if (getContext() == null || messageListView == null || size <= 0) return;
712+
if (getContext() == null || messageListView == null || size == 0) return;
712713
MessageAnchorDialog messageAnchorDialog = new MessageAnchorDialog.Builder(anchorView, messageListView, actions)
713714
.setOnItemClickListener(createMessageActionListener(message))
714715
.setOnDismissListener(() -> anchorDialogShowing.set(false))
715716
.build();
716717
messageAnchorDialog.show();
717718
anchorDialogShowing.set(true);
718-
} else if (MessageUtils.isUnknownType(message)) {
719-
if (getContext() == null || size <= 0) return;
719+
} else if (MessageUtils.isUnknownType(message) || !MessageUtils.isSucceed(message)) {
720+
if (getContext() == null || size == 0) return;
721+
hideKeyboard();
720722
DialogUtils.showListBottomDialog(requireContext(), actions, createMessageActionListener(message));
721723
} else {
722724
showEmojiActionsDialog(message, actions);
@@ -869,7 +871,7 @@ public static class Builder {
869871
* @param channelUrl the url of the channel will be implemented.
870872
*/
871873
public Builder(@NonNull String channelUrl) {
872-
this(channelUrl, SendbirdUIKit.getDefaultThemeMode());
874+
this(channelUrl, 0);
873875
}
874876

875877
/**
@@ -890,7 +892,9 @@ public Builder(@NonNull String channelUrl, @NonNull SendbirdUIKit.ThemeMode them
890892
*/
891893
public Builder(@NonNull String channelUrl, @StyleRes int customThemeResId) {
892894
this.bundle = new Bundle();
893-
this.bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
895+
if (customThemeResId != 0) {
896+
this.bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
897+
}
894898
this.bundle.putString(StringSet.KEY_CHANNEL_URL, channelUrl);
895899
}
896900

uikit/src/main/java/com/sendbird/uikit/fragments/ChannelListFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public static class Builder {
285285
* Constructor
286286
*/
287287
public Builder() {
288-
this(SendbirdUIKit.getDefaultThemeMode());
288+
this(0);
289289
}
290290

291291
/**
@@ -304,7 +304,9 @@ public Builder(@NonNull SendbirdUIKit.ThemeMode themeMode) {
304304
*/
305305
public Builder(@StyleRes int customThemeResId) {
306306
bundle = new Bundle();
307-
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
307+
if (customThemeResId != 0) {
308+
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
309+
}
308310
}
309311

310312
/**

uikit/src/main/java/com/sendbird/uikit/fragments/ChannelPushSettingFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static class Builder {
186186
* since 3.0.0
187187
*/
188188
public Builder(@NonNull String channelUrl) {
189-
this(channelUrl, SendbirdUIKit.getDefaultThemeMode());
189+
this(channelUrl, 0);
190190
}
191191

192192
/**
@@ -209,7 +209,9 @@ public Builder(@NonNull String channelUrl, @NonNull SendbirdUIKit.ThemeMode them
209209
*/
210210
public Builder(@NonNull String channelUrl, @StyleRes int customThemeResId) {
211211
bundle = new Bundle();
212-
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
212+
if (customThemeResId != 0) {
213+
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
214+
}
213215
bundle.putString(StringSet.KEY_CHANNEL_URL, channelUrl);
214216
}
215217

uikit/src/main/java/com/sendbird/uikit/fragments/ChannelSettingsFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public static class Builder {
409409
* @param channelUrl the url of the channel will be implemented.
410410
*/
411411
public Builder(@NonNull String channelUrl) {
412-
this(channelUrl, SendbirdUIKit.getDefaultThemeMode());
412+
this(channelUrl, 0);
413413
}
414414

415415
/**
@@ -430,7 +430,9 @@ public Builder(@NonNull String channelUrl, @NonNull SendbirdUIKit.ThemeMode them
430430
*/
431431
public Builder(@NonNull String channelUrl, @StyleRes int customThemeResId) {
432432
bundle = new Bundle();
433-
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
433+
if (customThemeResId != 0) {
434+
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
435+
}
434436
bundle.putString(StringSet.KEY_CHANNEL_URL, channelUrl);
435437
}
436438

uikit/src/main/java/com/sendbird/uikit/fragments/ChatNotificationChannelFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public static class Builder {
278278
* since 3.5.0
279279
*/
280280
public Builder(@NonNull String channelUrl) {
281-
this(channelUrl, SendbirdUIKit.getDefaultThemeMode());
281+
this(channelUrl, 0);
282282
}
283283

284284
/**
@@ -301,7 +301,9 @@ public Builder(@NonNull String channelUrl, @NonNull SendbirdUIKit.ThemeMode them
301301
*/
302302
public Builder(@NonNull String channelUrl, @StyleRes int customThemeResId) {
303303
bundle = new Bundle();
304-
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
304+
if (customThemeResId != 0) {
305+
bundle.putInt(StringSet.KEY_THEME_RES_ID, customThemeResId);
306+
}
305307
bundle.putString(StringSet.KEY_CHANNEL_URL, channelUrl);
306308
}
307309

0 commit comments

Comments
 (0)