Skip to content

Commit f3c7800

Browse files
author
rimdoo
committed
Added 3.3.1
1 parent c920e28 commit f3c7800

File tree

7 files changed

+31
-33
lines changed

7 files changed

+31
-33
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### v3.3.1 (Nov 21, 2022) with Core SDK `v4.1.3`
4+
* Fixed message update issue when an app is built with Proguard on
5+
* Improved stability
6+
37
### v3.3.0 (Nov 10, 2022) with Core SDK `v4.1.1`
48
* Support thread type in GroupChannel
59
* Added `THREAD` in `ReplyType`

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.3.0
19+
UIKIT_VERSION = 3.3.1
2020
UIKIT_VERSION_CODE = 1

uikit/build.gradle

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

6767
// Sendbird
68-
api 'com.sendbird.sdk:sendbird-chat:4.1.1'
68+
api 'com.sendbird.sdk:sendbird-chat:4.1.3'
6969

7070
implementation 'com.github.bumptech.glide:glide:4.13.0'
7171
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
@@ -80,5 +80,6 @@ dependencies {
8080

8181
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
8282

83+
8384
}
8485

uikit/src/androidTest/java/com/sendbird/uikit/ExampleInstrumentedTest.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

uikit/src/main/java/com/sendbird/uikit/SendbirdUIKit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ public class SendbirdUIKit {
5858
public enum LogLevel {
5959
ALL(Log.VERBOSE), INFO(Log.INFO), WARN(Log.WARN), ERROR(Log.ERROR), NONE(Integer.MAX_VALUE);
6060

61-
int level;
61+
final int level;
6262

6363
LogLevel(int level) {
6464
this.level = level;
6565
}
6666

67-
int getLevel() {
67+
public int getLevel() {
6868
return level;
6969
}
7070
}

uikit/src/main/java/com/sendbird/uikit/utils/DateUtils.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ public static String formatDateTime(@NonNull Context context, long timeInMillis)
3939
return formatTime(context, timeInMillis);
4040
} else if (isYesterday(timeInMillis)) {
4141
return context.getString(R.string.sb_text_yesterday);
42-
} else {
42+
} else if (isThisYear(timeInMillis)) {
4343
return formatDate2(timeInMillis);
44+
} else {
45+
return formatDate3(timeInMillis);
4446
}
4547
}
4648

@@ -68,6 +70,17 @@ public static String formatDate2(long timeInMillis) {
6870
return android.text.format.DateUtils.formatDateTime(null, timeInMillis, flags);
6971
}
7072

73+
/**
74+
* Formats timestamp to 'month/date/year' format (e.g. '12/19/2022').
75+
*/
76+
@NonNull
77+
public static String formatDate3(long timeInMillis) {
78+
int flags = android.text.format.DateUtils.FORMAT_SHOW_YEAR
79+
| android.text.format.DateUtils.FORMAT_SHOW_DATE
80+
| android.text.format.DateUtils.FORMAT_NUMERIC_DATE;
81+
return android.text.format.DateUtils.formatDateTime(null, timeInMillis, flags);
82+
}
83+
7184
/**
7285
* Returns whether the given date is today, based on the user's current locale.
7386
*/
@@ -87,6 +100,13 @@ public static boolean isYesterday(long timeInMillis) {
87100
&& now.get(Calendar.DATE) == date.get(Calendar.DATE);
88101
}
89102

103+
public static boolean isThisYear(long timeInMillis) {
104+
Calendar now = Calendar.getInstance();
105+
Calendar date = Calendar.getInstance();
106+
date.setTimeInMillis(timeInMillis);
107+
return now.get(Calendar.YEAR) == date.get(Calendar.YEAR);
108+
}
109+
90110
@NonNull
91111
public static String getDateString(long dateMillis) {
92112
final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd", Locale.getDefault());

uikit/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
<string name="sb_text_reply_to">Reply to %s</string>
187187
<string name="sb_text_replied_to">%s replied to %s</string>
188188
<string name="sb_text_error_original_message_not_found">Couldn\'t find the original message for this reply.</string>
189-
<string name="sb_text_exceed_mention_limit_count">"You can have up to %d mentions per message."</string>
189+
<string name="sb_text_exceed_mention_limit_count">You can have up to %d mentions per message.</string>
190190
<string name="sb_text_number_of_reply">%d reply</string>
191191
<string name="sb_text_number_of_replies">%d replies</string>
192192
<string name="sb_text_max_number_of_replies">99+ replies</string>

0 commit comments

Comments
 (0)