diff --git a/ext/syncthing/src/github.com/syncthing/syncthing b/ext/syncthing/src/github.com/syncthing/syncthing index f3dc78d4..58523060 160000 --- a/ext/syncthing/src/github.com/syncthing/syncthing +++ b/ext/syncthing/src/github.com/syncthing/syncthing @@ -1 +1 @@ -Subproject commit f3dc78d457d119dbffba42332f499151a5705ef4 +Subproject commit 58523060f02c7900ade6a2cc537a925f8d7de145 diff --git a/proguard-android.txt b/proguard-android.txt index ba369892..50bece9c 100644 --- a/proguard-android.txt +++ b/proguard-android.txt @@ -1,7 +1,10 @@ # Fix appcompat-v7 v21.0.0 causing crash on Samsung devices with Android v4.2.2 (https://code.google.com/p/android/issues/detail?id=78377) -keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; } -keep interface android.support.v7.** { *; } --keep class android.support.v7.widget.ShareActionProvider { *; } +-keep class android.support.v7.internal.** { *; } +-keep interface android.support.v7.internal.** { *; } +-keep class android.support.v7.** { *; } +-keep interface android.support.v7.** { *; } # Enable reflective access to mX509Certificate -keepclassmembers class android.net.http.SslCertificate { diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java index bdaed1f9..358aa544 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java @@ -119,6 +119,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener, public String address; public String clientVersion; public int completion; + public boolean connected; } public static class Model { @@ -583,6 +584,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener, c.address = conn.getString("address"); c.clientVersion = conn.getString("clientVersion"); c.completion = getDeviceCompletion(deviceId); + c.connected = conn.getBoolean("connected"); Connection prev = (mPreviousConnections.containsKey(deviceId)) ? mPreviousConnections.get(deviceId) diff --git a/src/main/java/com/nutomic/syncthingandroid/util/DevicesAdapter.java b/src/main/java/com/nutomic/syncthingandroid/util/DevicesAdapter.java index bb226896..4488f918 100644 --- a/src/main/java/com/nutomic/syncthingandroid/util/DevicesAdapter.java +++ b/src/main/java/com/nutomic/syncthingandroid/util/DevicesAdapter.java @@ -55,7 +55,7 @@ public class DevicesAdapter extends ArrayAdapter name.setText(getItem(position).name); Resources r = getContext().getResources(); - if (conn != null) { + if (conn != null && conn.connected) { if (conn.completion == 100) { status.setText(r.getString(R.string.device_up_to_date)); status.setTextColor(r.getColor(R.color.text_green)); diff --git a/src/main/res/layout/activity_log.xml b/src/main/res/layout/activity_log.xml index ee9f9655..51d8423c 100644 --- a/src/main/res/layout/activity_log.xml +++ b/src/main/res/layout/activity_log.xml @@ -2,7 +2,8 @@ + android:layout_height="match_parent" + android:orientation="vertical"> @@ -11,7 +12,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="vertical" - android:fillViewport="true"> + android:fillViewport="true" + android:visibility="visible"> - + android:layout_height="wrap_content" + android:visibility="visible" />