mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
set fixed avatar sizes for requests
necessary because of https://github.com/nextcloud/server/pull/31010 known issue: avatars in chat messages are too big atm Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
9dd8dc451a
commit
508f519468
@ -2188,13 +2188,13 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
|
|
||||||
String urlForAvatar;
|
String urlForAvatar;
|
||||||
if (!TextUtils.isEmpty(userId)) {
|
if (!TextUtils.isEmpty(userId)) {
|
||||||
urlForAvatar = ApiUtils.getUrlForAvatarWithName(baseUrl,
|
urlForAvatar = ApiUtils.getUrlForAvatar(baseUrl,
|
||||||
userId,
|
userId,
|
||||||
R.dimen.avatar_size_big);
|
true);
|
||||||
} else {
|
} else {
|
||||||
urlForAvatar = ApiUtils.getUrlForAvatarWithNameForGuests(baseUrl,
|
urlForAvatar = ApiUtils.getUrlForGuestAvatar(baseUrl,
|
||||||
nick,
|
nick,
|
||||||
R.dimen.avatar_size_big);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ParticipantDisplayItem participantDisplayItem = new ParticipantDisplayItem(userId,
|
ParticipantDisplayItem participantDisplayItem = new ParticipantDisplayItem(userId,
|
||||||
|
@ -330,9 +330,9 @@ public class CallNotificationActivity extends CallBaseActivity {
|
|||||||
private void setAvatarForOneToOneCall() {
|
private void setAvatarForOneToOneCall() {
|
||||||
ImageRequest imageRequest =
|
ImageRequest imageRequest =
|
||||||
DisplayUtils.getImageRequestForUrl(
|
DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(userBeingCalled.getBaseUrl(),
|
ApiUtils.getUrlForAvatar(userBeingCalled.getBaseUrl(),
|
||||||
currentConversation.getName(),
|
currentConversation.getName(),
|
||||||
R.dimen.avatar_size_big), null);
|
true), null);
|
||||||
|
|
||||||
ImagePipeline imagePipeline = Fresco.getImagePipeline();
|
ImagePipeline imagePipeline = Fresco.getImagePipeline();
|
||||||
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(imageRequest, null);
|
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(imageRequest, null);
|
||||||
|
@ -138,10 +138,10 @@ public class AdvancedUserItem extends AbstractFlexibleItem<AdvancedUserItem.User
|
|||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(
|
.setImageRequest(
|
||||||
DisplayUtils.getImageRequestForUrl(
|
DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(
|
ApiUtils.getUrlForAvatar(
|
||||||
userEntity.getBaseUrl(),
|
userEntity.getBaseUrl(),
|
||||||
participant.getActorId(),
|
participant.getActorId(),
|
||||||
R.dimen.small_item_height),
|
true),
|
||||||
null))
|
null))
|
||||||
.build();
|
.build();
|
||||||
holder.binding.userIcon.setController(draweeController);
|
holder.binding.userIcon.setController(draweeController);
|
||||||
|
@ -179,9 +179,9 @@ public class ContactItem extends AbstractFlexibleItem<ContactItem.ContactItemVie
|
|||||||
.setOldController(holder.binding.avatarDraweeView.getController())
|
.setOldController(holder.binding.avatarDraweeView.getController())
|
||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithNameForGuests(userEntity.getBaseUrl(),
|
ApiUtils.getUrlForGuestAvatar(userEntity.getBaseUrl(),
|
||||||
displayName,
|
displayName,
|
||||||
R.dimen.avatar_size),
|
false),
|
||||||
null))
|
null))
|
||||||
.build();
|
.build();
|
||||||
holder.binding.avatarDraweeView.setController(draweeController);
|
holder.binding.avatarDraweeView.setController(draweeController);
|
||||||
@ -192,9 +192,9 @@ public class ContactItem extends AbstractFlexibleItem<ContactItem.ContactItemVie
|
|||||||
.setOldController(holder.binding.avatarDraweeView.getController())
|
.setOldController(holder.binding.avatarDraweeView.getController())
|
||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(userEntity.getBaseUrl(),
|
ApiUtils.getUrlForAvatar(userEntity.getBaseUrl(),
|
||||||
participant.getActorId(),
|
participant.getActorId(),
|
||||||
R.dimen.avatar_size),
|
false),
|
||||||
null))
|
null))
|
||||||
.build();
|
.build();
|
||||||
holder.binding.avatarDraweeView.setController(draweeController);
|
holder.binding.avatarDraweeView.setController(draweeController);
|
||||||
|
@ -297,9 +297,9 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
|||||||
.setOldController(holder.binding.dialogAvatar.getController())
|
.setOldController(holder.binding.dialogAvatar.getController())
|
||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(userEntity.getBaseUrl(),
|
ApiUtils.getUrlForAvatar(userEntity.getBaseUrl(),
|
||||||
conversation.getName(),
|
conversation.getName(),
|
||||||
R.dimen.avatar_size),
|
false),
|
||||||
userEntity))
|
userEntity))
|
||||||
.build();
|
.build();
|
||||||
holder.binding.dialogAvatar.setController(draweeController);
|
holder.binding.dialogAvatar.setController(draweeController);
|
||||||
|
@ -157,15 +157,15 @@ public class MentionAutocompleteItem extends AbstractFlexibleItem<ParticipantIte
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String avatarId = objectId;
|
String avatarId = objectId;
|
||||||
String avatarUrl = ApiUtils.getUrlForAvatarWithName(currentUser.getBaseUrl(),
|
String avatarUrl = ApiUtils.getUrlForAvatar(currentUser.getBaseUrl(),
|
||||||
avatarId, R.dimen.avatar_size_big);
|
avatarId, true);
|
||||||
|
|
||||||
if (SOURCE_GUESTS.equals(source)) {
|
if (SOURCE_GUESTS.equals(source)) {
|
||||||
avatarId = displayName;
|
avatarId = displayName;
|
||||||
avatarUrl = ApiUtils.getUrlForAvatarWithNameForGuests(
|
avatarUrl = ApiUtils.getUrlForGuestAvatar(
|
||||||
currentUser.getBaseUrl(),
|
currentUser.getBaseUrl(),
|
||||||
avatarId,
|
avatarId,
|
||||||
R.dimen.avatar_size_big);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (holder.binding.avatarDraweeView != null) {
|
if (holder.binding.avatarDraweeView != null) {
|
||||||
|
@ -168,8 +168,8 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
|||||||
.setOldController(holder.binding.avatarDraweeView.getController())
|
.setOldController(holder.binding.avatarDraweeView.getController())
|
||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithNameForGuests(userEntity.getBaseUrl(),
|
ApiUtils.getUrlForGuestAvatar(userEntity.getBaseUrl(),
|
||||||
displayName, R.dimen.avatar_size), null))
|
displayName, false), null))
|
||||||
.build();
|
.build();
|
||||||
holder.binding.avatarDraweeView.setController(draweeController);
|
holder.binding.avatarDraweeView.setController(draweeController);
|
||||||
|
|
||||||
@ -179,8 +179,8 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
|||||||
.setOldController(holder.binding.avatarDraweeView.getController())
|
.setOldController(holder.binding.avatarDraweeView.getController())
|
||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(userEntity.getBaseUrl(),
|
ApiUtils.getUrlForAvatar(userEntity.getBaseUrl(),
|
||||||
participant.getActorId(), R.dimen.avatar_size), null))
|
participant.getActorId(), false), null))
|
||||||
.build();
|
.build();
|
||||||
holder.binding.avatarDraweeView.setController(draweeController);
|
holder.binding.avatarDraweeView.setController(draweeController);
|
||||||
}
|
}
|
||||||
|
@ -192,6 +192,7 @@ import java.util.HashMap
|
|||||||
import java.util.Objects
|
import java.util.Objects
|
||||||
import java.util.concurrent.ExecutionException
|
import java.util.concurrent.ExecutionException
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
@AutoInjector(NextcloudTalkApplication::class)
|
@AutoInjector(NextcloudTalkApplication::class)
|
||||||
class ChatController(args: Bundle) :
|
class ChatController(args: Bundle) :
|
||||||
@ -405,16 +406,11 @@ class ChatController(args: Bundle) :
|
|||||||
|
|
||||||
private fun loadAvatarForStatusBar() {
|
private fun loadAvatarForStatusBar() {
|
||||||
if (inOneToOneCall() && activity != null && conversationVoiceCallMenuItem != null) {
|
if (inOneToOneCall() && activity != null && conversationVoiceCallMenuItem != null) {
|
||||||
val avatarSize = DisplayUtils.convertDpToPixel(
|
|
||||||
conversationVoiceCallMenuItem?.icon!!
|
|
||||||
.intrinsicWidth.toFloat(),
|
|
||||||
activity
|
|
||||||
).toInt()
|
|
||||||
|
|
||||||
val imageRequest = DisplayUtils.getImageRequestForUrl(
|
val imageRequest = DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithNameAndPixels(
|
ApiUtils.getUrlForAvatar(
|
||||||
conversationUser?.baseUrl,
|
conversationUser?.baseUrl,
|
||||||
currentConversation?.name, avatarSize / 2
|
currentConversation?.name, true
|
||||||
),
|
),
|
||||||
conversationUser!!
|
conversationUser!!
|
||||||
)
|
)
|
||||||
@ -426,7 +422,11 @@ class ChatController(args: Bundle) :
|
|||||||
object : BaseBitmapDataSubscriber() {
|
object : BaseBitmapDataSubscriber() {
|
||||||
override fun onNewResultImpl(bitmap: Bitmap?) {
|
override fun onNewResultImpl(bitmap: Bitmap?) {
|
||||||
if (actionBar != null && bitmap != null && resources != null) {
|
if (actionBar != null && bitmap != null && resources != null) {
|
||||||
val roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(resources!!, bitmap)
|
|
||||||
|
val avatarSize = (actionBar?.height!! / 1.5).roundToInt()
|
||||||
|
val bitmapResized = Bitmap.createScaledBitmap(bitmap, avatarSize, avatarSize, false)
|
||||||
|
|
||||||
|
val roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(resources!!, bitmapResized)
|
||||||
roundedBitmapDrawable.isCircular = true
|
roundedBitmapDrawable.isCircular = true
|
||||||
roundedBitmapDrawable.setAntiAlias(true)
|
roundedBitmapDrawable.setAntiAlias(true)
|
||||||
actionBar?.setIcon(roundedBitmapDrawable)
|
actionBar?.setIcon(roundedBitmapDrawable)
|
||||||
|
@ -722,9 +722,9 @@ class ConversationInfoController(args: Bundle) :
|
|||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(
|
.setImageRequest(
|
||||||
DisplayUtils.getImageRequestForUrl(
|
DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(
|
ApiUtils.getUrlForAvatar(
|
||||||
conversationUser!!.baseUrl,
|
conversationUser!!.baseUrl,
|
||||||
conversation!!.name, R.dimen.avatar_size_big
|
conversation!!.name, true
|
||||||
),
|
),
|
||||||
conversationUser
|
conversationUser
|
||||||
)
|
)
|
||||||
|
@ -256,16 +256,12 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
|
|
||||||
private void loadUserAvatar(MaterialButton button) {
|
private void loadUserAvatar(MaterialButton button) {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
int avatarSize;
|
ImageRequest imageRequest = DisplayUtils.getImageRequestForUrl(
|
||||||
|
ApiUtils.getUrlForAvatar(
|
||||||
if (getResources() != null) {
|
currentUser.getBaseUrl(),
|
||||||
avatarSize = getResources().getDimensionPixelSize(R.dimen.avatar_size_app_bar);
|
currentUser.getUserId(),
|
||||||
} else {
|
false),
|
||||||
avatarSize = (int) DisplayUtils.convertDpToPixel(30.0f, context);
|
currentUser);
|
||||||
}
|
|
||||||
|
|
||||||
ImageRequest imageRequest = DisplayUtils.getImageRequestForUrl(ApiUtils.getUrlForAvatarWithNameAndPixels(currentUser.getBaseUrl(),
|
|
||||||
currentUser.getUserId(), avatarSize), currentUser);
|
|
||||||
|
|
||||||
ImagePipeline imagePipeline = Fresco.getImagePipeline();
|
ImagePipeline imagePipeline = Fresco.getImagePipeline();
|
||||||
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(imageRequest, null);
|
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(imageRequest, null);
|
||||||
|
@ -379,11 +379,13 @@ public class NotificationWorker extends Worker {
|
|||||||
notificationBuilder.setOnlyAlertOnce(true);
|
notificationBuilder.setOnlyAlertOnce(true);
|
||||||
|
|
||||||
if (decryptedPushMessage.getNotificationUser().getType().equals("user") || decryptedPushMessage.getNotificationUser().getType().equals("guest")) {
|
if (decryptedPushMessage.getNotificationUser().getType().equals("user") || decryptedPushMessage.getNotificationUser().getType().equals("guest")) {
|
||||||
String avatarUrl = ApiUtils.getUrlForAvatarWithName(signatureVerification.getUserEntity().getBaseUrl(), decryptedPushMessage.getNotificationUser().getId(), R.dimen.avatar_size);
|
String avatarUrl = ApiUtils.getUrlForAvatar(signatureVerification.getUserEntity().getBaseUrl(),
|
||||||
|
decryptedPushMessage.getNotificationUser().getId(), false);
|
||||||
|
|
||||||
if (decryptedPushMessage.getNotificationUser().getType().equals("guest")) {
|
if (decryptedPushMessage.getNotificationUser().getType().equals("guest")) {
|
||||||
avatarUrl = ApiUtils.getUrlForAvatarWithNameForGuests(signatureVerification.getUserEntity().getBaseUrl(),
|
avatarUrl = ApiUtils.getUrlForGuestAvatar(signatureVerification.getUserEntity().getBaseUrl(),
|
||||||
decryptedPushMessage.getNotificationUser().getName(), R.dimen.avatar_size);
|
decryptedPushMessage.getNotificationUser().getName(),
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageRequest imageRequest =
|
ImageRequest imageRequest =
|
||||||
|
@ -290,10 +290,10 @@ public class ChatMessage implements MessageContentType, MessageContentType.Image
|
|||||||
@Override
|
@Override
|
||||||
public String getAvatar() {
|
public String getAvatar() {
|
||||||
if (getActorType().equals("users")) {
|
if (getActorType().equals("users")) {
|
||||||
return ApiUtils.getUrlForAvatarWithName(getActiveUser().getBaseUrl(), actorId, R.dimen.avatar_size);
|
return ApiUtils.getUrlForAvatar(getActiveUser().getBaseUrl(), actorId, true);
|
||||||
} else if (getActorType().equals("bridged")) {
|
} else if (getActorType().equals("bridged")) {
|
||||||
return ApiUtils.getUrlForAvatarWithName(getActiveUser().getBaseUrl(), "bridge-bot",
|
return ApiUtils.getUrlForAvatar(getActiveUser().getBaseUrl(), "bridge-bot",
|
||||||
R.dimen.avatar_size);
|
true);
|
||||||
} else {
|
} else {
|
||||||
String apiId =
|
String apiId =
|
||||||
NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest);
|
NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest);
|
||||||
@ -301,7 +301,7 @@ public class ChatMessage implements MessageContentType, MessageContentType.Image
|
|||||||
if (!TextUtils.isEmpty(getActorDisplayName())) {
|
if (!TextUtils.isEmpty(getActorDisplayName())) {
|
||||||
apiId = getActorDisplayName();
|
apiId = getActorDisplayName();
|
||||||
}
|
}
|
||||||
return ApiUtils.getUrlForAvatarWithNameForGuests(getActiveUser().getBaseUrl(), apiId, R.dimen.avatar_size);
|
return ApiUtils.getUrlForGuestAvatar(getActiveUser().getBaseUrl(), apiId, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -129,10 +129,10 @@ public class ChooseAccountDialogFragment extends DialogFragment {
|
|||||||
.setOldController(binding.currentAccount.userIcon.getController())
|
.setOldController(binding.currentAccount.userIcon.getController())
|
||||||
.setAutoPlayAnimations(true)
|
.setAutoPlayAnimations(true)
|
||||||
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
.setImageRequest(DisplayUtils.getImageRequestForUrl(
|
||||||
ApiUtils.getUrlForAvatarWithName(
|
ApiUtils.getUrlForAvatar(
|
||||||
user.getBaseUrl(),
|
user.getBaseUrl(),
|
||||||
user.getUserId(),
|
user.getUserId(),
|
||||||
R.dimen.small_item_height),
|
false),
|
||||||
null))
|
null))
|
||||||
.build();
|
.build();
|
||||||
binding.currentAccount.userIcon.setController(draweeController);
|
binding.currentAccount.userIcon.setController(draweeController);
|
||||||
|
@ -44,6 +44,8 @@ public class ApiUtils {
|
|||||||
public static final int APIv2 = 2;
|
public static final int APIv2 = 2;
|
||||||
public static final int APIv3 = 3;
|
public static final int APIv3 = 3;
|
||||||
public static final int APIv4 = 4;
|
public static final int APIv4 = 4;
|
||||||
|
public static final int AVATAR_SIZE_BIG = 512;
|
||||||
|
public static final int AVATAR_SIZE_SMALL = 64;
|
||||||
private static final String TAG = "ApiUtils";
|
private static final String TAG = "ApiUtils";
|
||||||
private static final String ocsApiVersion = "/ocs/v2.php";
|
private static final String ocsApiVersion = "/ocs/v2.php";
|
||||||
private static final String spreedApiVersion = "/apps/spreed/api/v1";
|
private static final String spreedApiVersion = "/apps/spreed/api/v1";
|
||||||
@ -347,22 +349,13 @@ public class ApiUtils {
|
|||||||
return "/status.php";
|
return "/status.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUrlForAvatarWithNameAndPixels(String baseUrl, String name, int avatarSize) {
|
public static String getUrlForAvatar(String baseUrl, String name, boolean requestBigSize) {
|
||||||
|
int avatarSize = requestBigSize ? AVATAR_SIZE_BIG : AVATAR_SIZE_SMALL;
|
||||||
return baseUrl + "/index.php/avatar/" + Uri.encode(name) + "/" + avatarSize;
|
return baseUrl + "/index.php/avatar/" + Uri.encode(name) + "/" + avatarSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUrlForAvatarWithName(String baseUrl, String name, @DimenRes int avatarSize) {
|
public static String getUrlForGuestAvatar(String baseUrl, String name, boolean requestBigSize) {
|
||||||
avatarSize = Math.round(NextcloudTalkApplication
|
int avatarSize = requestBigSize ? AVATAR_SIZE_BIG : AVATAR_SIZE_SMALL;
|
||||||
.Companion.getSharedApplication().getResources().getDimension(avatarSize));
|
|
||||||
|
|
||||||
return baseUrl + "/index.php/avatar/" + Uri.encode(name) + "/" + avatarSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUrlForAvatarWithNameForGuests(String baseUrl, String name,
|
|
||||||
@DimenRes int avatarSize) {
|
|
||||||
avatarSize = Math.round(NextcloudTalkApplication
|
|
||||||
.Companion.getSharedApplication().getResources().getDimension(avatarSize));
|
|
||||||
|
|
||||||
return baseUrl + "/index.php/avatar/guest/" + Uri.encode(name) + "/" + avatarSize;
|
return baseUrl + "/index.php/avatar/guest/" + Uri.encode(name) + "/" + avatarSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,11 +318,11 @@ public class DisplayUtils {
|
|||||||
chip.setBounds(0, 0, chip.getIntrinsicWidth(), chip.getIntrinsicHeight());
|
chip.setBounds(0, 0, chip.getIntrinsicWidth(), chip.getIntrinsicHeight());
|
||||||
|
|
||||||
if (!isCall) {
|
if (!isCall) {
|
||||||
String url = ApiUtils.getUrlForAvatarWithName(conversationUser.getBaseUrl(), id, R.dimen.avatar_size_big);
|
String url = ApiUtils.getUrlForAvatar(conversationUser.getBaseUrl(), id, true);
|
||||||
if ("guests".equals(type) || "guest".equals(type)) {
|
if ("guests".equals(type) || "guest".equals(type)) {
|
||||||
url = ApiUtils.getUrlForAvatarWithNameForGuests(
|
url = ApiUtils.getUrlForGuestAvatar(
|
||||||
conversationUser.getBaseUrl(),
|
conversationUser.getBaseUrl(),
|
||||||
String.valueOf(label), R.dimen.avatar_size_big);
|
String.valueOf(label), true);
|
||||||
}
|
}
|
||||||
ImageRequest imageRequest = getImageRequestForUrl(url, null);
|
ImageRequest imageRequest = getImageRequestForUrl(url, null);
|
||||||
ImagePipeline imagePipeline = Fresco.getImagePipeline();
|
ImagePipeline imagePipeline = Fresco.getImagePipeline();
|
||||||
@ -572,7 +572,7 @@ public class DisplayUtils {
|
|||||||
avatarId = user.getUsername();
|
avatarId = user.getUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
String avatarString = ApiUtils.getUrlForAvatarWithName(user.getBaseUrl(), avatarId, R.dimen.avatar_size_big);
|
String avatarString = ApiUtils.getUrlForAvatar(user.getBaseUrl(), avatarId, true);
|
||||||
|
|
||||||
// clear cache
|
// clear cache
|
||||||
if (deleteCache) {
|
if (deleteCache) {
|
||||||
|
Loading…
Reference in New Issue
Block a user