liuzhenxing1118 3 years ago
parent
commit
11c04502ef

+ 4 - 5
app/src/main/java/com/xplora/xpchat/fragment/ChatFunctionFragment.java

@@ -93,14 +93,13 @@ public class ChatFunctionFragment extends DialogFragment {
     }
 
     public void initDownloadStatus(MessageBean bean) {
-        if (bean.type == Constant.MESSAGE_TYPE_TEXT || bean.type == Constant.MESSAGE_TYPE_EMOJI) {
+        //0:无  1:save 2:download
+        if (bean.type == Constant.MESSAGE_TYPE_TEXT || bean.type == Constant.MESSAGE_TYPE_EMOJI || bean.type == Constant.MESSAGE_TYPE_VOICE) {
             saveOrDownload = 0;
-        } else if (bean.type == Constant.MESSAGE_TYPE_VOICE) {
-            saveOrDownload = bean.filePath.length() <= 1 ?  2 : 0;
         } else if (bean.type == Constant.MESSAGE_TYPE_PHOTO) {
-            saveOrDownload = bean.filePath.length() <= 1 ? 2 : 1;
+            saveOrDownload = bean.filePath.length() <= 1 ? 0 : 1;
         } else if (bean.type == Constant.MESSAGE_TYPE_VIDEO) {
-            saveOrDownload = bean.filePath.length() <= 1 || bean.videoPath.length() <= 1 ? 2 : 1;
+            saveOrDownload = bean.videoPath.length() <= 1 ? 0 : 1;
         }
         Log.d(TAG, "initDownloadStatus: " + saveOrDownload);
     }