mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Fixed crash when adding a new device
This commit is contained in:
parent
618945c5bf
commit
0780d606d9
1 changed files with 3 additions and 1 deletions
|
@ -45,7 +45,9 @@ public class DevicesAdapter extends ArrayAdapter<Device> {
|
||||||
|
|
||||||
name.setText(getItem(position).getDisplayName());
|
name.setText(getItem(position).getDisplayName());
|
||||||
Resources r = getContext().getResources();
|
Resources r = getContext().getResources();
|
||||||
if (mConnections != null && mConnections.connections.get(deviceId).connected) {
|
boolean haveInfo = mConnections != null && mConnections.connections.containsKey(deviceId) &&
|
||||||
|
mConnections.connections.get(deviceId).connected;
|
||||||
|
if (haveInfo) {
|
||||||
Connections.Connection conn = mConnections.connections.get(deviceId);
|
Connections.Connection conn = mConnections.connections.get(deviceId);
|
||||||
if (conn.completion == 100) {
|
if (conn.completion == 100) {
|
||||||
status.setText(r.getString(R.string.device_up_to_date));
|
status.setText(r.getString(R.string.device_up_to_date));
|
||||||
|
|
Loading…
Reference in a new issue