Reformat code

This commit is contained in:
AsamK 2021-09-28 18:42:05 +02:00
parent ba817e2ae4
commit 4acab9043c
2 changed files with 8 additions and 3 deletions

View file

@ -102,7 +102,12 @@ public interface Signal extends DBusInterface {
void updateDeviceName(String deviceName) throws Error.Failure;
void updateProfile(
String givenName, String familyName, String about, String aboutEmoji, String avatarPath, boolean removeAvatar
String givenName,
String familyName,
String about,
String aboutEmoji,
String avatarPath,
boolean removeAvatar
) throws Error.Failure;
void updateProfile(

View file

@ -505,14 +505,14 @@ public class DbusSignalImpl implements Signal {
final String aboutEmoji,
String avatarPath,
final boolean removeAvatar
) {
) {
try {
if (avatarPath.isEmpty()) {
avatarPath = null;
}
Optional<File> avatarFile = removeAvatar
? Optional.absent()
: avatarPath == null ? null : Optional.of(new File(avatarPath));
: avatarPath == null ? null : Optional.of(new File(avatarPath));
m.setProfile(givenName, familyName, about, aboutEmoji, avatarFile);
} catch (IOException e) {
throw new Error.Failure(e.getMessage());