Profile: Make name modifiable
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
0685d4a159
commit
c59b3e1230
@ -22,7 +22,7 @@ import java.nio.charset.StandardCharsets;
|
||||
public class Profile extends BaseObservable implements Copyable<Profile>, Observable {
|
||||
private final Interface iface = new Interface();
|
||||
private boolean isConnected;
|
||||
private final String name;
|
||||
private String name;
|
||||
private final ObservableList<Peer> peers = new ObservableArrayList<>();
|
||||
|
||||
public Profile(String name) {
|
||||
@ -55,6 +55,7 @@ public class Profile extends BaseObservable implements Copyable<Profile>, Observ
|
||||
return isConnected;
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@ -89,6 +90,11 @@ public class Profile extends BaseObservable implements Copyable<Profile>, Observ
|
||||
notifyPropertyChanged(BR.isConnected);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
notifyPropertyChanged(BR.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder().append(iface.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user