Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e339f3e7 authored by emancebo's avatar emancebo Committed by Gerrit Code Review
Browse files

Show message to user when toggling word wrap mode

For very large files, toggling word wrap mode takes a long time on the
UI thread. Show a message to the user so they know what is happening.

Change-Id: Idd3aed525233b944234b6f8864a9d3c02adc00b5
Issue-Id: QRDL-1080
parent c53dafc4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -847,4 +847,6 @@
    <string name="storage_permissions_explanation">Go to Settings, and tap Permissions to grant permission.</string>
    <string name="snackbar_settings">Settings</string>

    <!-- Wrap mode - toast -->
    <string name="toggle_word_wrap_msg">Toggling word wrap mode</string>
</resources>
+8 −1
Original line number Diff line number Diff line
@@ -915,7 +915,14 @@ public class EditorActivity extends Activity implements TextWatcher {
                        toggleNoSuggestions();
                        break;
                    case R.id.mnu_word_wrap:
                        DialogHelper.showToast(EditorActivity.this,
                                R.string.toggle_word_wrap_msg, Toast.LENGTH_SHORT);
                        mHandler.postDelayed(new Runnable() {
                            @Override
                            public void run() {
                                toggleWordWrap();
                            }
                        }, 50);
                        break;
                    case R.id.mnu_syntax_highlight:
                        toggleSyntaxHighlight();