Skip to content

Commit

Permalink
set up wfc dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
imndx committed May 25, 2019
1 parent 7827c4e commit 018da03
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions chat/src/main/java/cn/wildfire/chat/app/MyApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import com.tencent.bugly.crashreport.CrashReport;

import java.io.File;

import cn.wildfire.chat.app.third.location.viewholder.LocationMessageContentViewHolder;
import cn.wildfire.chat.kit.WfcUIKit;
import cn.wildfire.chat.kit.conversation.message.viewholder.MessageViewHolderManager;
Expand All @@ -25,6 +27,26 @@ public void onCreate() {
wfcUIKit = new WfcUIKit();
wfcUIKit.init(this);
MessageViewHolderManager.getInstance().registerMessageViewHolder(LocationMessageContentViewHolder.class);
seuptWfcDirs();
}
}

private void seuptWfcDirs() {
File file = new File(Config.VIDEO_SAVE_DIR);
if (!file.exists()) {
file.mkdirs();
}
file = new File(Config.AUDIO_SAVE_DIR);
if (!file.exists()) {
file.mkdirs();
}
file = new File(Config.FILE_SAVE_DIR);
if (!file.exists()) {
file.mkdirs();
}
file = new File(Config.PHOTO_SAVE_DIR);
if (!file.exists()) {
file.mkdirs();
}
}

Expand Down

0 comments on commit 018da03

Please sign in to comment.