Skip to content

Commit 697eb2b

Browse files
committed
Merge branch 'release/4.8' of github.com:wordpress-mobile/WordPress-Android into release/4.8
2 parents 51c8bd5 + 763fda9 commit 697eb2b

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

WordPress/src/main/java/org/wordpress/android/ui/themes/ThemeBrowserActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ private void startWebActivity(String themeId, ThemeWebActivity.ThemeWebActivityT
407407
String toastText = getString(R.string.no_network_message);
408408

409409
if (NetworkUtils.isNetworkAvailable(this)) {
410-
if (mCurrentTheme != null) {
410+
if (mCurrentTheme != null && (themeId != null || !themeId.isEmpty())) {
411411
boolean isCurrentTheme = mCurrentTheme.getId().equals(themeId);
412412
Map<String, Object> themeProperties = new HashMap<>();
413413
themeProperties.put(THEME_ID, themeId);

libs/utils/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/WPUnderlineSpan.java

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,18 @@
1717
package org.wordpress.android.util.helpers;
1818

1919
import android.os.Parcel;
20-
import android.text.ParcelableSpan;
21-
import android.text.TextPaint;
22-
import android.text.style.CharacterStyle;
23-
import android.text.style.UpdateAppearance;
20+
import android.text.style.UnderlineSpan;
2421

25-
public class WPUnderlineSpan extends CharacterStyle
26-
implements UpdateAppearance, ParcelableSpan {
22+
/**
23+
* WPUnderlineSpan is used as an alternative class to UnderlineSpan. UnderlineSpan is used by EditText auto
24+
* correct, so it can get mixed up with our formatting.
25+
*/
26+
public class WPUnderlineSpan extends UnderlineSpan {
2727
public WPUnderlineSpan() {
28+
super();
2829
}
2930

3031
public WPUnderlineSpan(Parcel src) {
31-
}
32-
33-
public int getSpanTypeId() {
34-
return 6;
35-
}
36-
37-
public int describeContents() {
38-
return 0;
39-
}
40-
41-
public void writeToParcel(Parcel dest, int flags) {
42-
}
43-
44-
@Override
45-
public void updateDrawState(TextPaint ds) {
46-
ds.setUnderlineText(true);
32+
super(src);
4733
}
4834
}

0 commit comments

Comments
 (0)