Ask the core for the selfavatar directory, fix #1381 backup export/import loses self-avatar

This commit is contained in:
Hocuri
2020-04-22 14:36:21 +02:00
parent 32bda482cd
commit d7d5faaf64
@@ -72,9 +72,8 @@ public class AvatarHelper {
}
public static File getSelfAvatarFile(@NonNull Context context, @NonNull String address) {
File avatarDirectory = new File(context.getFilesDir(), AVATAR_DIRECTORY);
avatarDirectory.mkdirs();
return new File(avatarDirectory, address+".jpg");
String dirString = DcHelper.getContext(context).getConfig(DcHelper.CONFIG_SELF_AVATAR);
return new File(dirString);
}
public static void setSelfAvatar(@NonNull Context context, @NonNull String address, @Nullable byte[] data) throws IOException {