File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
WordPressUtils/src/main/java/org/wordpress/android/util Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,25 @@ public int compare(Object blog1, Object blog2) {
2626 /**
2727 * Return a blog name or blog url (host part only) if trimmed name is an empty string
2828 */
29- public static String getBlogNameFromAccountMap (Map <String , Object > account ) {
30- String blogName = StringUtils . unescapeHTML ( MapUtils . getMapStr ( account , "blogName" ) );
29+ public static String getBlogNameOrHostNameFromAccountMap (Map <String , Object > account ) {
30+ String blogName = getBlogNameFromAccountMap ( account );
3131 if (blogName .trim ().length () == 0 ) {
3232 blogName = StringUtils .getHost (MapUtils .getMapStr (account , "url" ));
3333 }
3434 return blogName ;
3535 }
36- }
36+
37+ /**
38+ * Return a blog name or blog url (host part only) if trimmed name is an empty string
39+ */
40+ public static String getBlogNameFromAccountMap (Map <String , Object > account ) {
41+ return StringUtils .unescapeHTML (MapUtils .getMapStr (account , "blogName" ));
42+ }
43+
44+ /**
45+ * Return blog url (host part only) if trimmed name is an empty string
46+ */
47+ public static String getHostNameFromAccountMap (Map <String , Object > account ) {
48+ return StringUtils .getHost (MapUtils .getMapStr (account , "url" ));
49+ }
50+ }
You can’t perform that action at this time.
0 commit comments