mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-26 04:52:29 +01:00
Simplify code
This commit is contained in:
parent
8f4c6fb6ac
commit
ea1b910d7e
@ -590,11 +590,8 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
|||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(final Editable s) {
|
public void afterTextChanged(final Editable s) {
|
||||||
// Remove rich text formatting
|
// Remove rich text formatting
|
||||||
final CharacterStyle[] toBeRemovedSpans = s.getSpans(
|
for (final CharacterStyle span : s.getSpans(0, s.length(), CharacterStyle.class)) {
|
||||||
0, s.length(), CharacterStyle.class
|
s.removeSpan(span);
|
||||||
);
|
|
||||||
for (final CharacterStyle toBeRemovedSpan : toBeRemovedSpans) {
|
|
||||||
s.removeSpan(toBeRemovedSpan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final String newText = searchEditText.getText().toString();
|
final String newText = searchEditText.getText().toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user