mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Ask the core for the selfavatar directory, fix #1381 backup export/import loses self-avatar
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user