diff src/com/five_ten_sg/connectbot/HostEditorActivity.java @ 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 77ac18bc1b2f
children 91f80da38f96
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);
         }
     }