changeset 114:5eda34fb607f

host editor database values override summary text only if non-empty
author Carl Byington <carl@five-ten-sg.com>
date Wed, 18 Jun 2014 14:34:02 -0700
parents cb3b9b660b3d
children bc59a399f627
files src/com/five_ten_sg/connectbot/HostEditorActivity.java
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/HostEditorActivity.java	Wed Jun 18 14:24:00 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/HostEditorActivity.java	Wed Jun 18 14:34:02 2014 -0700
@@ -334,14 +334,8 @@
     }
 
     private void updateSummaries() {
-        // for all text preferences, set hint as current database value
+        // for all text preferences, set hint as current database value if not empty
         for (String key : this.pref.values.keySet()) {
-            if (key.equals(HostDatabase.FIELD_HOST_POSTLOGIN)) continue;
-
-            if (key.equals(HostDatabase.FIELD_HOST_EMULATION)) continue;
-
-            if (key.equals(HostDatabase.FIELD_HOST_MONITOR)) continue;
-
             Preference pref = this.findPreference(key);
 
             if (pref == null) continue;
@@ -375,7 +369,8 @@
                     value = listPref.getEntries()[entryIndex];
             }
 
-            pref.setSummary(value);
+            String v = (String)value;
+            if (v.length() == 0) pref.setSummary(value);
         }
     }