diff --git a/common/src/main/java/com/yunbao/common/utils/GiftCacheUtil.java b/common/src/main/java/com/yunbao/common/utils/GiftCacheUtil.java index 63284e4b1..c5da0aff7 100644 --- a/common/src/main/java/com/yunbao/common/utils/GiftCacheUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/GiftCacheUtil.java @@ -90,6 +90,13 @@ public class GiftCacheUtil { return new File(CommonAppConfig.GIF_PATH, getDownloadSaveName(id) + ".svga").exists(); } + /** + * 通过id获取礼物文件 + */ + public static File getGiftForId(int id){ + return new File(CommonAppConfig.GIF_PATH, getDownloadSaveName(id) + ".svga"); + } + /** * 根据文件名返回id */ @@ -127,7 +134,7 @@ public class GiftCacheUtil { */ public void downloadGiftForId(LiveGiftBean bean, CommonCallback mDownloadGifCallback) { if (checkGiftIsDownload(bean.getId())) { - mDownloadGifCallback.callback(null); + mDownloadGifCallback.callback(getGiftForId(bean.getId())); return; } clickId.add(bean.getId()+"");