From e500a22cafe1b6ef0e6a1571ad7acaa385674436 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Wed, 1 Apr 2015 17:00:06 +0200 Subject: fix #4824: be more explicit when no connectors are active --- main/src/cgeo/geocaching/AboutActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'main') diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java index 90961d5..e5a98c2 100644 --- a/main/src/cgeo/geocaching/AboutActivity.java +++ b/main/src/cgeo/geocaching/AboutActivity.java @@ -291,14 +291,18 @@ public class AboutActivity extends AbstractViewPagerActivity .append("\nMap strategy: ").append(Settings.getLiveMapStrategy().toString().toLowerCase(Locale.getDefault())) .append("\nHW-acceleration: ").append(Settings.useHardwareAcceleration() ? "enabled" : "disabled") .append(" (").append(Settings.useHardwareAcceleration() != Settings.HW_ACCEL_DISABLED_BY_DEFAULT ? "default state" : "manually changed").append(")"); + final StringBuilder connectors = new StringBuilder(); + int connectorCount = 0; for (final ILogin connector : ConnectorFactory.getActiveLiveConnectors()) { - body.append('\n').append(connector.getName()).append(": ").append(connector.isLoggedIn() ? "logged in" : "not logged in") + connectorCount++; + connectors.append("\n - ").append(connector.getName()).append(": ").append(connector.isLoggedIn() ? "logged in" : "not logged in") .append(" (").append(connector.getLoginStatusString()).append(')'); if (connector.getName().equals("geocaching.com") && connector.isLoggedIn()) { - body.append(" / ").append(Settings.getGCMemberStatus()); + connectors.append(" / ").append(Settings.getGCMemberStatus()); } } - body.append("\nSystem language: ").append(Locale.getDefault()); + body.append("\nGeocaching sites enabled:").append(connectorCount > 0 ? connectors : " none") + .append("\nSystem language: ").append(Locale.getDefault()); if (Settings.isUseEnglish()) { body.append(" (cgeo forced to English)"); } -- cgit v1.1