From 9503f4a6c76262ee46300319fdeee3d81693fc53 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Thu, 13 Oct 2022 20:42:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=A4=BC=E7=89=A9=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=BAnull=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/utils/GiftCacheUtil.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()+"");