Show any connection error on network info page

This commit is contained in:
str4d
2014-05-17 15:00:01 +00:00
parent b22983d2d1
commit 36691ed957
2 changed files with 9 additions and 0 deletions

View File

@@ -48,4 +48,9 @@
android:layout_height="wrap_content"
android:text="0" />
<TextView
android:id="@+id/error"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>

View File

@@ -44,5 +44,9 @@ public class NetworkInfoFragment extends Fragment {
Collection<BannedPeer> bannedPeers = I2PBote.getInstance().getBannedPeers();
((TextView) view.findViewById(R.id.banned_peers)).setText(
"" + bannedPeers.size());
Exception e = I2PBote.getInstance().getConnectError();
if (e != null)
((TextView) view.findViewById(R.id.error)).setText(e.toString());
}
}