mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Reformat code
This commit is contained in:
parent
ba817e2ae4
commit
4acab9043c
2 changed files with 8 additions and 3 deletions
|
@ -102,7 +102,12 @@ public interface Signal extends DBusInterface {
|
||||||
void updateDeviceName(String deviceName) throws Error.Failure;
|
void updateDeviceName(String deviceName) throws Error.Failure;
|
||||||
|
|
||||||
void updateProfile(
|
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;
|
) throws Error.Failure;
|
||||||
|
|
||||||
void updateProfile(
|
void updateProfile(
|
||||||
|
|
|
@ -505,14 +505,14 @@ public class DbusSignalImpl implements Signal {
|
||||||
final String aboutEmoji,
|
final String aboutEmoji,
|
||||||
String avatarPath,
|
String avatarPath,
|
||||||
final boolean removeAvatar
|
final boolean removeAvatar
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
if (avatarPath.isEmpty()) {
|
if (avatarPath.isEmpty()) {
|
||||||
avatarPath = null;
|
avatarPath = null;
|
||||||
}
|
}
|
||||||
Optional<File> avatarFile = removeAvatar
|
Optional<File> avatarFile = removeAvatar
|
||||||
? Optional.absent()
|
? 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);
|
m.setProfile(givenName, familyName, about, aboutEmoji, avatarFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new Error.Failure(e.getMessage());
|
throw new Error.Failure(e.getMessage());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue