@@ -43,13 +43,13 @@ public static AvatarImageHandler getInstance() {
4343 /**
4444 * 联系人头像 32 *32
4545 * 40*40
46- * .nbs/cache/avatars/thumbs
46+ * .nbs/cache/avatars/custom
4747 */
48- private static String AVATAR_THUMB_HOME ;
48+ private static String AVATAR_CUSTOM_HOME ;
4949 /**
50- * 用户配置头标
50+ * 用户配置头标
5151 * .nbs/profile/avatars/
52- * 放置128*128 上传IPFS
52+ * 放置128*128 上传IPFS
5353 * .nbs/profile/avatars/thumbs
5454 * 64*64 hashFileName
5555 */
@@ -64,7 +64,7 @@ public static AvatarImageHandler getInstance() {
6464 private AvatarImageHandler () {
6565 AVATAR_PROFILE_HOME = AppGlobalCnst .consturactPath (Launcher .appBasePath ,"profile" ,"avatars" );
6666 AVATAR_ORIGIN_HOME = AppGlobalCnst .consturactPath (Launcher .appBasePath ,"profile" ,"origin" );
67- AVATAR_THUMB_HOME = AppGlobalCnst .consturactPath (Launcher .appBasePath ,"cache" ,"avatars" ,"thumbs " );
67+ AVATAR_CUSTOM_HOME = AppGlobalCnst .consturactPath (Launcher .appBasePath ,"cache" ,"avatars" ,"custom " );
6868 }
6969
7070 /**
@@ -84,7 +84,7 @@ public void initAvatarLocalDir(){
8484 destFile = new File (AVATAR_ORIGIN_HOME );
8585 if (!destFile .exists ())destFile .mkdirs ();
8686
87- destFile = new File (AVATAR_THUMB_HOME );
87+ destFile = new File (AVATAR_CUSTOM_HOME );
8888 if (!destFile .exists ())destFile .mkdirs ();
8989 }
9090
@@ -148,14 +148,14 @@ public void createdAvatar4Profile(File srcFile,String hashFileName) throws Excep
148148 }
149149
150150 /**
151- * 40
151+ * 40*40png
152152 * @param srcFile
153153 * @param hashFileName
154154 * @return
155155 */
156156 public ImageIcon createContactsAvatar (File srcFile ,String hashFileName ){
157157 if (srcFile ==null ||!srcFile .exists ())return null ;
158- String targetPath = AppGlobalCnst .consturactPath (AVATAR_THUMB_HOME ,hashFileName );
158+ String targetPath = AppGlobalCnst .consturactPath (AVATAR_CUSTOM_HOME ,hashFileName );
159159 File thumbs4Contacts = new File (targetPath );
160160 try {
161161 generateThumbScale (srcFile ,thumbs4Contacts ,DEFAULT_CONTACTS_THUMB_SIZE );
@@ -222,10 +222,9 @@ private void compressImage(Image img,File destFile,int w,int h) throws IOExcepti
222222 /**
223223 * 联系人头像 32 *32
224224 * 40*40
225- * .nbs/cache/avatars/thumbs
226- */
227- public static String getAvatarThumbHome () {
228- return AVATAR_THUMB_HOME ;
225+ * .nbs/cache/avatars/custom
226+ public static String getAvatarCustomHome() {
227+ return AVATAR_CUSTOM_HOME;
229228 }
230229
231230 /**
0 commit comments