mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Add support for updated server badge image url formats.
This commit is contained in:
committed by
Greyson Parrelli
parent
6e00920c95
commit
8d0acb277c
@@ -29,7 +29,7 @@ import okhttp3.ConnectionSpec;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
/**
|
||||
* A simple model loader for fetching media over http/https using OkHttp.
|
||||
* A loader which will load a sprite sheet for a particular badge at the correct dpi for this device.
|
||||
*/
|
||||
public class BadgeLoader implements ModelLoader<Badge, InputStream> {
|
||||
|
||||
@@ -40,12 +40,12 @@ public class BadgeLoader implements ModelLoader<Badge, InputStream> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable LoadData<InputStream> buildLoadData(@NonNull Badge badge, int width, int height, @NonNull Options options) {
|
||||
return new LoadData<>(badge, new OkHttpStreamFetcher(client, new GlideUrl(badge.getImageUrl().toString())));
|
||||
public @Nullable LoadData<InputStream> buildLoadData(@NonNull Badge request, int width, int height, @NonNull Options options) {
|
||||
return new LoadData<>(request, new OkHttpStreamFetcher(client, new GlideUrl(request.getImageUrl().toString())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handles(@NonNull Badge badge) {
|
||||
public boolean handles(@NonNull Badge badgeSpriteSheetRequest) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user