Skip to content

Commit df645c8

Browse files
author
rimdoo
committed
Added 2.2.7
1 parent a3313ac commit df645c8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
### v2.2.7 (Mar 16, 2023) with Core SDK `v3.1.18`
4+
* Improved stability.
5+
36
### v2.2.6 (Aug 3, 2022) with Core SDK `v3.1.18`
47
* Support Android 13
58
* Set the `maxSdkVersion` of `android.permission.READ_EXTERNAL_STORAGE` to `32`

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ org.gradle.jvmargs=-Xmx1536m
1717
android.useAndroidX=true
1818
android.enablerD8=true
1919

20-
UIKIT_VERSION = 2.2.6
20+
UIKIT_VERSION = 2.2.7
2121
UIKIT_VERSION_CODE = 1
2222

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.Manifest;
44
import android.animation.Animator;
55
import android.animation.AnimatorListenerAdapter;
6+
import android.content.Context;
67
import android.graphics.Bitmap;
78
import android.os.Build;
89
import android.os.Bundle;
@@ -85,6 +86,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
8586
@Override
8687
public void onResume() {
8788
super.onResume();
89+
if (getActivity() == null || getContext() == null) return;
8890
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
8991
getActivity().getWindow().setNavigationBarColor(ContextCompat.getColor(getContext(), R.color.background_700));
9092
}
@@ -164,6 +166,8 @@ public boolean onResourceReady(T resource, Object model, Target<T> target, DataS
164166
}
165167

166168
protected void onDrawPage() {
169+
if (!isActive()) return;
170+
final Context context = getContext();
167171
Logger.d("PhotoViewFragment::onDrawPage() - nickname:" + senderNickname);
168172
final ImageView ivPhoto = binding.ivPhoto;
169173
final ImageView ivDelete = binding.ivDelete;
@@ -174,7 +178,7 @@ protected void onDrawPage() {
174178
final String url = this.url;
175179

176180
tvTitle.setText(senderNickname);
177-
tvCreatedAt.setText(DateUtils.formatTime(getContext(), this.createdAt));
181+
tvCreatedAt.setText(DateUtils.formatTime(context, this.createdAt));
178182
loading.setVisibility(View.VISIBLE);
179183

180184
if (mimeType.toLowerCase().contains(StringSet.gif)) {

0 commit comments

Comments
 (0)