Merge profile commands to a single UpdateProfileCommand

This commit is contained in:
AsamK 2019-10-16 18:28:55 +02:00
parent abb6ebc910
commit 958d10fcd1
6 changed files with 89 additions and 89 deletions

View file

@ -210,7 +210,13 @@ public class Manager implements Signal {
}
public void setProfileAvatar(File avatar) throws IOException {
accountManager.setProfileAvatar(account.getProfileKey(), Utils.createStreamDetailsFromFile(avatar));
final StreamDetails streamDetails = Utils.createStreamDetailsFromFile(avatar);
accountManager.setProfileAvatar(account.getProfileKey(), streamDetails);
streamDetails.getStream().close();
}
public void removeProfileAvatar() throws IOException {
accountManager.setProfileAvatar(account.getProfileKey(), null);
}
public void unregister() throws IOException {