Skip to content

Commit 018da03

Browse files
committed
set up wfc dirs
1 parent 7827c4e commit 018da03

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

chat/src/main/java/cn/wildfire/chat/app/MyApp.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import com.tencent.bugly.crashreport.CrashReport;
77

8+
import java.io.File;
9+
810
import cn.wildfire.chat.app.third.location.viewholder.LocationMessageContentViewHolder;
911
import cn.wildfire.chat.kit.WfcUIKit;
1012
import cn.wildfire.chat.kit.conversation.message.viewholder.MessageViewHolderManager;
@@ -25,6 +27,26 @@ public void onCreate() {
2527
wfcUIKit = new WfcUIKit();
2628
wfcUIKit.init(this);
2729
MessageViewHolderManager.getInstance().registerMessageViewHolder(LocationMessageContentViewHolder.class);
30+
seuptWfcDirs();
31+
}
32+
}
33+
34+
private void seuptWfcDirs() {
35+
File file = new File(Config.VIDEO_SAVE_DIR);
36+
if (!file.exists()) {
37+
file.mkdirs();
38+
}
39+
file = new File(Config.AUDIO_SAVE_DIR);
40+
if (!file.exists()) {
41+
file.mkdirs();
42+
}
43+
file = new File(Config.FILE_SAVE_DIR);
44+
if (!file.exists()) {
45+
file.mkdirs();
46+
}
47+
file = new File(Config.PHOTO_SAVE_DIR);
48+
if (!file.exists()) {
49+
file.mkdirs();
2850
}
2951
}
3052

0 commit comments

Comments
 (0)