Enable super editor on mobile

This commit is contained in:
Hillel Coren 2022-09-11 17:22:00 +03:00
parent b9747625ef
commit 97c673934f
1 changed files with 3 additions and 10 deletions

View File

@ -75,10 +75,7 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
final state = widget.viewModel.state; final state = widget.viewModel.state;
final company = state.company; final company = state.company;
final settingsUIState = state.settingsUIState; final settingsUIState = state.settingsUIState;
final length = company.markdownEmailEnabled && final length = company.markdownEmailEnabled ? 3 : 2;
widget.viewModel.state.prefState.isDesktop
? 3
: 2;
_focusNode = FocusScopeNode(); _focusNode = FocusScopeNode();
_controller = TabController( _controller = TabController(
@ -143,7 +140,6 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
} }
if (viewModel.state.company.markdownEmailEnabled && if (viewModel.state.company.markdownEmailEnabled &&
widget.viewModel.state.prefState.isDesktop &&
_bodyController.text.trim().startsWith('<')) { _bodyController.text.trim().startsWith('<')) {
_bodyController.text = html2md.convert(_bodyController.text); _bodyController.text = html2md.convert(_bodyController.text);
} }
@ -160,7 +156,6 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
_emailPreview = ''; _emailPreview = '';
if (state.company.markdownEmailEnabled && if (state.company.markdownEmailEnabled &&
widget.viewModel.state.prefState.isDesktop &&
_defaultBody.trim().startsWith('<')) { _defaultBody.trim().startsWith('<')) {
_defaultBody = html2md.convert(_defaultBody); _defaultBody = html2md.convert(_defaultBody);
} }
@ -332,8 +327,7 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
Tab( Tab(
text: localization.settings, text: localization.settings,
), ),
if (company.markdownEmailEnabled && if (company.markdownEmailEnabled)
widget.viewModel.state.prefState.isDesktop)
Tab( Tab(
text: localization.design, text: localization.design,
), ),
@ -529,8 +523,7 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
SizedBox(height: 16), SizedBox(height: 16),
], ],
), ),
if (company.markdownEmailEnabled && if (company.markdownEmailEnabled)
widget.viewModel.state.prefState.isDesktop)
ColoredBox( ColoredBox(
color: Colors.white, color: Colors.white,
child: ExampleEditor( child: ExampleEditor(