mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Refactoring
This commit is contained in:
@@ -213,8 +213,6 @@ public class StyleHelper {
|
||||
popupMenu.getMenu().findItem(R.id.menu_style_indentation_increase).setEnabled(maxLevel == null);
|
||||
popupMenu.getMenu().findItem(R.id.menu_style_indentation_decrease).setEnabled(indents.length > 0);
|
||||
|
||||
popupMenu.getMenu().findItem(R.id.menu_style_parenthesis).setEnabled(BuildConfig.DEBUG);
|
||||
popupMenu.getMenu().findItem(R.id.menu_style_quotes).setEnabled(BuildConfig.DEBUG);
|
||||
popupMenu.getMenu().findItem(R.id.menu_style_code).setEnabled(BuildConfig.DEBUG);
|
||||
|
||||
popupMenu.insertIcons(context);
|
||||
@@ -250,10 +248,6 @@ public class StyleHelper {
|
||||
return setMark(item);
|
||||
} else if (groupId == R.id.group_style_strikethrough) {
|
||||
return setStrikeThrough(item);
|
||||
} else if (groupId == R.id.group_style_parenthesis) {
|
||||
return surround(item, "(", ")");
|
||||
} else if (groupId == R.id.group_style_quotes) {
|
||||
return surround(item, "\"", "\"");
|
||||
} else if (groupId == R.id.group_style_code) {
|
||||
return setCode(item);
|
||||
} else if (groupId == R.id.group_style_clear) {
|
||||
@@ -495,13 +489,6 @@ public class StyleHelper {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean surround(MenuItem item, String before, String after) {
|
||||
Log.breadcrumb("style", "action", "parenthesis");
|
||||
edit.insert(end, after);
|
||||
edit.insert(start, before);
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean setCode(MenuItem item) {
|
||||
Log.breadcrumb("style", "action", "code");
|
||||
_setSize(HtmlHelper.FONT_SMALL);
|
||||
|
||||
Reference in New Issue
Block a user