Skip to content

Commit

Permalink
Added 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Doo Rim authored and Doo Rim committed Aug 17, 2022
1 parent 588c725 commit 244ca14
Show file tree
Hide file tree
Showing 25 changed files with 1,268 additions and 237 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

### v3.1.1 (Aug 17, 2022) with Core SDK `v4.0.5`
* Added `setMessageTextUIConfig(TextUIConfig, TextUIConfig)` in `ChannelFragment.Builder`, `OpenChannelFragment.Builder`, `MessageListComponent.Params`, `OpenChannelMessageListComponent.Params`
* Added `setSentAtTextUIConfig(TextUIConfig, TextUIConfig)` in `ChannelFragment.Builder`, `OpenChannelFragment.Builder`, `MessageListComponent.Params`, `OpenChannelMessageListComponent.Params`
* Added `setNicknameTextUIConfig(TextUIConfig)` in `ChannelFragment.Builder`, `MessageListComponent.Params`
* Added `setNicknameTextUIConfig(TextUIConfig, TextUIConfig, TextUIConfig)` in `OpenChannelFragment.Builder`, `OpenChannelMessageListComponent.Params`
* Added `setMessageBackground(int, int)` in `ChannelFragment.Builder`, `OpenChannelFragment.Builder`
* Added `setMessageBackground(Drawable, Drawable)` in `MessageListComponent.Params`, `OpenChannelMessageListComponent.Params`
* Added `setReactionListBackground(int, int)` in `ChannelFragment.Builder`
* Added `setReactionListBackground(Drawable, Drawable)` in `MessageListComponent.Params`
* Added `setOgtagBackground(int, int)` in `ChannelFragment.Builder`, `OpenChannelFragment.Builder`
* Added `setOgtagBackground(Drawable, Drawable)` in `MessageListComponent.Params`, `OpenChannelMessageListComponent.Params`
* Added `setLinkedTextColor(int)` in `ChannelFragment.Builder`, `OpenChannelFragment.Builder`
* Added `setLinkedTextColor(ColorStateList)` in `MessageListComponent.Params`, `OpenChannelMessageListComponent.Params`

### v3.1.0 (Aug 3, 2022) with Core SDK `v4.0.5`
* Support Android 13
* Set the `maxSdkVersion` of `android.permission.READ_EXTERNAL_STORAGE` to `32`
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ org.gradle.jvmargs=-Xmx1536m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

UIKIT_VERSION = 3.1.0
UIKIT_VERSION = 3.1.1
UIKIT_VERSION_CODE = 1
14 changes: 14 additions & 0 deletions uikit/src/main/java/com/sendbird/uikit/consts/StringSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ public class StringSet {
public final static String KEY_MENTION_UI_CONFIG_SENT_FROM_OTHERS = "KEY_MENTION_UI_CONFIG_SENT_FROM_OTHERS";
public final static String KEY_EDITED_MARK_UI_CONFIG_SENT_FROM_ME = "KEY_EDITED_MARK_UI_CONFIG_SENT_FROM_ME";
public final static String KEY_EDITED_MARK_UI_CONFIG_SENT_FROM_OTHERS = "KEY_EDITED_MARK_UI_CONFIG_SENT_FROM_OTHERS";
public final static String KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_ME = "KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_ME";
public final static String KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_OTHERS = "KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_OTHERS";
public final static String KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_ME = "KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_ME";
public final static String KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_OTHERS = "KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_OTHERS";
public final static String KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_ME = "KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_ME";
public final static String KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_OTHERS = "KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_OTHERS";
public final static String KEY_OPERATOR_TEXT_UI_CONFIG = "KEY_OPERATOR_TEXT_UI_CONFIG";
public final static String KEY_MESSAGE_BACKGROUND_SENT_FROM_ME = "KEY_MESSAGE_BACKGROUND_SENT_FROM_ME";
public final static String KEY_MESSAGE_BACKGROUND_SENT_FROM_OTHERS = "KEY_MESSAGE_BACKGROUND_SENT_FROM_OTHERS";
public final static String KEY_REACTION_LIST_BACKGROUND_SENT_FROM_ME = "KEY_REACTION_LIST_BACKGROUND_SENT_FROM_ME";
public final static String KEY_REACTION_LIST_BACKGROUND_SENT_FROM_OTHERS = "KEY_REACTION_LIST_BACKGROUND_SENT_FROM_OTHERS";
public final static String KEY_OGTAG_BACKGROUND_SENT_FROM_ME = "KEY_OGTAG_BACKGROUND_SENT_FROM_ME";
public final static String KEY_OGTAG_BACKGROUND_SENT_FROM_OTHERS = "KEY_OGTAG_BACKGROUND_SENT_FROM_OTHERS";
public final static String KEY_LINKED_TEXT_COLOR = "KEY_LINKED_TEXT_COLOR";

public final static String KEY_THEME_RES_ID = "KEY_THEME_RES_ID";
public final static String KEY_USE_HEADER = "KEY_USE_HEADER";
Expand Down
106 changes: 106 additions & 0 deletions uikit/src/main/java/com/sendbird/uikit/fragments/ChannelFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -1995,6 +1996,111 @@ public Builder setEditedTextMarkUIConfig(@Nullable TextUIConfig configSentFromMe
return this;
}

/**
* Sets the UI configuration of message text.
*
* @param configSentFromMe the UI configuration of the message text that was sent from me.
* @param configSentFromOthers the UI configuration of the message text that was sent from others.\
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setMessageTextUIConfig(@Nullable TextUIConfig configSentFromMe, @Nullable TextUIConfig configSentFromOthers) {
if (configSentFromMe != null)
bundle.putParcelable(StringSet.KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_ME, configSentFromMe);
if (configSentFromOthers != null)
bundle.putParcelable(StringSet.KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_OTHERS, configSentFromOthers);
return this;
}

/**
* Sets the UI configuration of message sentAt text.
*
* @param configSentFromMe the UI configuration of the message sentAt text that was sent from me.
* @param configSentFromOthers the UI configuration of the message sentAt text that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setSentAtTextUIConfig(@Nullable TextUIConfig configSentFromMe, @Nullable TextUIConfig configSentFromOthers) {
if (configSentFromMe != null)
bundle.putParcelable(StringSet.KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_ME, configSentFromMe);
if (configSentFromOthers != null)
bundle.putParcelable(StringSet.KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_OTHERS, configSentFromOthers);
return this;
}

/**
* Sets the UI configuration of sender nickname text.
*
* @param configSentFromOthers the UI configuration of the sender nickname text that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setNicknameTextUIConfig(@NonNull TextUIConfig configSentFromOthers) {
bundle.putParcelable(StringSet.KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_OTHERS, configSentFromOthers);
return this;
}

/**
* Sets the UI configuration of message background drawable.
*
* @param drawableResSentFromMe the UI configuration of the message background that was sent from me.
* @param drawableResSentFromOthers the UI configuration of the message background that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setMessageBackground(@DrawableRes int drawableResSentFromMe, @DrawableRes int drawableResSentFromOthers) {
bundle.putInt(StringSet.KEY_MESSAGE_BACKGROUND_SENT_FROM_ME, drawableResSentFromMe);
bundle.putInt(StringSet.KEY_MESSAGE_BACKGROUND_SENT_FROM_OTHERS, drawableResSentFromOthers);
return this;
}

/**
* Sets the UI configuration of message reaction list background drawable.
*
* @param drawableResSentFromMe the UI configuration of the message reaction list background drawable that was sent from me.
* @param drawableResSentFromOthers the UI configuration of the message reaction list background drawable that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setReactionListBackground(@DrawableRes int drawableResSentFromMe, @DrawableRes int drawableResSentFromOthers) {
bundle.putInt(StringSet.KEY_REACTION_LIST_BACKGROUND_SENT_FROM_ME, drawableResSentFromMe);
bundle.putInt(StringSet.KEY_REACTION_LIST_BACKGROUND_SENT_FROM_OTHERS, drawableResSentFromOthers);
return this;
}

/**
* Sets the UI configuration of ogtag message background drawable.
*
* @param drawableResSentFromMe the UI configuration of the ogtag message background drawable that was sent from me.
* @param drawableResSentFromOthers the UI configuration of the ogtag message background drawable that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setOgtagBackground(@DrawableRes int drawableResSentFromMe, @DrawableRes int drawableResSentFromOthers) {
bundle.putInt(StringSet.KEY_OGTAG_BACKGROUND_SENT_FROM_ME, drawableResSentFromMe);
bundle.putInt(StringSet.KEY_OGTAG_BACKGROUND_SENT_FROM_OTHERS, drawableResSentFromOthers);
return this;
}

/**
* Sets the UI configuration of the linked text color in the message text.
*
* @param colorRes the UI configuration of the linked text color.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setLinkedTextColor(@ColorRes int colorRes) {
bundle.putInt(StringSet.KEY_LINKED_TEXT_COLOR, colorRes);
return this;
}

/**
* Register a callback to be invoked when the right button of the input is clicked.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -1626,6 +1627,103 @@ public Builder setEditedTextMarkUIConfig(@Nullable TextUIConfig configSentFromMe
return this;
}

/**
* Sets the UI configuration of message text.
*
* @param configSentFromMe the UI configuration of the message text that was sent from me.
* @param configSentFromOthers the UI configuration of the message text that was sent from others.\
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setMessageTextUIConfig(@Nullable TextUIConfig configSentFromMe, @Nullable TextUIConfig configSentFromOthers) {
if (configSentFromMe != null)
bundle.putParcelable(StringSet.KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_ME, configSentFromMe);
if (configSentFromOthers != null)
bundle.putParcelable(StringSet.KEY_MESSAGE_TEXT_UI_CONFIG_SENT_FROM_OTHERS, configSentFromOthers);
return this;
}

/**
* Sets the UI configuration of message sentAt text.
*
* @param configSentFromMe the UI configuration of the message sentAt text that was sent from me.
* @param configSentFromOthers the UI configuration of the message sentAt text that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setSentAtTextUIConfig(@Nullable TextUIConfig configSentFromMe, @Nullable TextUIConfig configSentFromOthers) {
if (configSentFromMe != null)
bundle.putParcelable(StringSet.KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_ME, configSentFromMe);
if (configSentFromOthers != null)
bundle.putParcelable(StringSet.KEY_SENT_AT_TEXT_UI_CONFIG_SENT_FROM_OTHERS, configSentFromOthers);
return this;
}

/**
* Sets the UI configuration of sender nickname text.
*
* @param configSentFromMe the UI configuration of the sender nickname text that was sent from me.
* @param configSentFromOthers the UI configuration of the sender nickname text that was sent from others.
* @param configSentFromOperator the UI configuration of the sender nickname text that was sent from operator.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setNicknameTextUIConfig(@Nullable TextUIConfig configSentFromMe, @Nullable TextUIConfig configSentFromOthers, @Nullable TextUIConfig configSentFromOperator) {
if (configSentFromMe != null)
bundle.putParcelable(StringSet.KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_ME, configSentFromMe);
if (configSentFromOthers != null)
bundle.putParcelable(StringSet.KEY_NICKNAME_TEXT_UI_CONFIG_SENT_FROM_OTHERS, configSentFromOthers);
if (configSentFromOperator != null)
bundle.putParcelable(StringSet.KEY_OPERATOR_TEXT_UI_CONFIG, configSentFromOperator);
return this;
}

/**
* Sets the UI configuration of message background drawable.
*
* @param drawableResSentFromMe the UI configuration of the message background that was sent from me.
* @param drawableResSentFromOthers the UI configuration of the message background that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setMessageBackground(@DrawableRes int drawableResSentFromMe, @DrawableRes int drawableResSentFromOthers) {
bundle.putInt(StringSet.KEY_MESSAGE_BACKGROUND_SENT_FROM_ME, drawableResSentFromMe);
bundle.putInt(StringSet.KEY_MESSAGE_BACKGROUND_SENT_FROM_OTHERS, drawableResSentFromOthers);
return this;
}

/**
* Sets the UI configuration of ogtag message background drawable.
*
* @param drawableResSentFromMe the UI configuration of the ogtag message background drawable that was sent from me.
* @param drawableResSentFromOthers the UI configuration of the ogtag message background drawable that was sent from others.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setOgtagBackground(@DrawableRes int drawableResSentFromMe, @DrawableRes int drawableResSentFromOthers) {
bundle.putInt(StringSet.KEY_OGTAG_BACKGROUND_SENT_FROM_ME, drawableResSentFromMe);
bundle.putInt(StringSet.KEY_OGTAG_BACKGROUND_SENT_FROM_OTHERS, drawableResSentFromOthers);
return this;
}

/**
* Sets the UI configuration of the linked text color in the message text.
*
* @param colorRes the UI configuration of the linked text color.
* @return This Builder object to allow for chaining of calls to set methods.
* @since 3.1.1
*/
@NonNull
public Builder setLinkedTextColor(@ColorRes int colorRes) {
bundle.putInt(StringSet.KEY_LINKED_TEXT_COLOR, colorRes);
return this;
}

/**
* Creates an {@link OpenChannelFragment} with the arguments supplied to this
* builder.
Expand Down
Loading

0 comments on commit 244ca14

Please sign in to comment.