mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
Fix a few crashes
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
e58137ea79
commit
6815021a53
3 changed files with 31 additions and 14 deletions
|
@ -431,7 +431,7 @@ public class CallNotificationController extends BaseController {
|
|||
.into(new SimpleTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) {
|
||||
if (getActivity() != null) {
|
||||
if (getActivity() != null && avatarImageView != null) {
|
||||
avatarImageView.setImageBitmap(TransformationUtils.circleCrop(GlideApp.get
|
||||
(getActivity()).getBitmapPool(), resource, avatarSize, avatarSize));
|
||||
}
|
||||
|
|
|
@ -161,16 +161,18 @@ public class ConversationInfoController extends BaseController {
|
|||
}
|
||||
|
||||
private void setupAdapter() {
|
||||
if (adapter == null) {
|
||||
if (adapter == null && getActivity() != null) {
|
||||
adapter = new FlexibleAdapter<>(recyclerViewItems, getActivity(), true);
|
||||
}
|
||||
|
||||
if (recyclerView != null && getActivity() != null) {
|
||||
SmoothScrollLinearLayoutManager layoutManager =
|
||||
new SmoothScrollLinearLayoutManager(getActivity());
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
recyclerView.setHasFixedSize(true);
|
||||
recyclerView.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleParticipants(List<Participant> participants) {
|
||||
UserItem userItem;
|
||||
|
@ -260,13 +262,22 @@ public class ConversationInfoController extends BaseController {
|
|||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (nameCategoryView != null) {
|
||||
nameCategoryView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (conversationDisplayName != null) {
|
||||
conversationDisplayName.setText(conversation.getDisplayName());
|
||||
}
|
||||
|
||||
loadConversationAvatar();
|
||||
|
||||
if (conversationUser.hasSpreedCapabilityWithName("notification-levels")) {
|
||||
if (messageNotificationLevel != null) {
|
||||
messageNotificationLevel.setEnabled(true);
|
||||
messageNotificationLevel.setAlpha(1.0f);
|
||||
}
|
||||
|
||||
if (!conversation.getNotificationLevel().equals(Conversation.NotificationLevel.DEFAULT)) {
|
||||
String stringValue;
|
||||
switch (new EnumNotificationLevelConverter().convertToInt(conversation.getNotificationLevel())) {
|
||||
|
|
|
@ -616,13 +616,19 @@ public class SettingsController extends BaseController {
|
|||
} else {
|
||||
switch (newValue) {
|
||||
case "HTTP":
|
||||
if (proxyPortEditText != null) {
|
||||
proxyPortEditText.setValue("3128");
|
||||
}
|
||||
break;
|
||||
case "DIRECT":
|
||||
if (proxyPortEditText != null) {
|
||||
proxyPortEditText.setValue("8080");
|
||||
}
|
||||
break;
|
||||
case "SOCKS":
|
||||
if (proxyPortEditText != null) {
|
||||
proxyPortEditText.setValue("1080");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue