Separate imageListToDbUrl from choosePreferredImage

imageListToDbUrl should be used if the URL is going to be saved to the database, to avoid saving nothing in case at the moment of saving the user preference is to not show images.
This commit is contained in:
Stypox 2023-05-02 21:36:11 +02:00
parent 873e10c957
commit 7828cd233d
9 changed files with 96 additions and 40 deletions

View file

@ -355,7 +355,7 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
channel.setServiceId(info.getServiceId());
channel.setUrl(info.getUrl());
channel.setData(info.getName(),
ImageStrategy.choosePreferredImage(info.getAvatars()),
ImageStrategy.imageListToDbUrl(info.getAvatars()),
info.getDescription(),
info.getSubscriberCount());
channelSubscription = null;