1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 03:11:30 +00:00

Fixed crash when adding a new device

This commit is contained in:
Felix Ableitner 2017-01-08 21:47:11 +09:00
parent 618945c5bf
commit 0780d606d9

View file

@ -45,7 +45,9 @@ public class DevicesAdapter extends ArrayAdapter<Device> {
name.setText(getItem(position).getDisplayName());
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);
if (conn.completion == 100) {
status.setText(r.getString(R.string.device_up_to_date));