mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 06:14:10 +01:00
Fix crashing bugs
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
85a5278f79
commit
213c7ea520
app/src/main/java/com/nextcloud/talk/controllers
@ -475,6 +475,7 @@ public class CallNotificationController extends BaseController {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case ROOM_GROUP_CALL:
|
case ROOM_GROUP_CALL:
|
||||||
|
if (avatarImageView != null) {
|
||||||
GlideApp.with(NextcloudTalkApplication.getSharedApplication().getApplicationContext())
|
GlideApp.with(NextcloudTalkApplication.getSharedApplication().getApplicationContext())
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
@ -483,7 +484,9 @@ public class CallNotificationController extends BaseController {
|
|||||||
.override(avatarSize, avatarSize)
|
.override(avatarSize, avatarSize)
|
||||||
.apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
.apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
||||||
.into(avatarImageView);
|
.into(avatarImageView);
|
||||||
|
}
|
||||||
case ROOM_PUBLIC_CALL:
|
case ROOM_PUBLIC_CALL:
|
||||||
|
if (avatarImageView != null) {
|
||||||
GlideApp.with(NextcloudTalkApplication.getSharedApplication().getApplicationContext())
|
GlideApp.with(NextcloudTalkApplication.getSharedApplication().getApplicationContext())
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
@ -492,6 +495,7 @@ public class CallNotificationController extends BaseController {
|
|||||||
.override(avatarSize, avatarSize)
|
.override(avatarSize, avatarSize)
|
||||||
.apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
.apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
||||||
.into(avatarImageView);
|
.into(avatarImageView);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ public class ConversationInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadConversationAvatar() {
|
private void loadConversationAvatar() {
|
||||||
|
if (conversationAvatarImageView != null) {
|
||||||
switch (conversation.getType()) {
|
switch (conversation.getType()) {
|
||||||
case ROOM_TYPE_ONE_TO_ONE_CALL:
|
case ROOM_TYPE_ONE_TO_ONE_CALL:
|
||||||
if (!TextUtils.isEmpty(conversation.getName())) {
|
if (!TextUtils.isEmpty(conversation.getName())) {
|
||||||
@ -360,4 +360,5 @@ public class ConversationInfoController extends BaseController {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,6 +190,7 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
int avatarSize = (int) DisplayUtils.convertDpToPixel(menuItem.getIcon().getIntrinsicHeight(), getActivity());
|
int avatarSize = (int) DisplayUtils.convertDpToPixel(menuItem.getIcon().getIntrinsicHeight(), getActivity());
|
||||||
|
|
||||||
|
if (currentUser != null) {
|
||||||
GlideUrl glideUrl = new GlideUrl(ApiUtils.getUrlForAvatarWithNameAndPixels(currentUser.getBaseUrl(),
|
GlideUrl glideUrl = new GlideUrl(ApiUtils.getUrlForAvatarWithNameAndPixels(currentUser.getBaseUrl(),
|
||||||
currentUser.getUserId(), avatarSize), new LazyHeaders.Builder()
|
currentUser.getUserId(), avatarSize), new LazyHeaders.Builder()
|
||||||
.setHeader("Accept", "image/*")
|
.setHeader("Accept", "image/*")
|
||||||
@ -210,6 +211,7 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onAttach(@NonNull View view) {
|
protected void onAttach(@NonNull View view) {
|
||||||
|
@ -208,7 +208,7 @@ public class WebViewLoginController extends BaseController {
|
|||||||
basePageLoaded = true;
|
basePageLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(username)) {
|
if (!TextUtils.isEmpty(username) && webView != null) {
|
||||||
if (loginStep == 1) {
|
if (loginStep == 1) {
|
||||||
webView.loadUrl("javascript: {document.getElementsByClassName('login')[0].click(); };");
|
webView.loadUrl("javascript: {document.getElementsByClassName('login')[0].click(); };");
|
||||||
} else if (!automatedLoginAttempted) {
|
} else if (!automatedLoginAttempted) {
|
||||||
|
Loading…
Reference in New Issue
Block a user