Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add clipboard cleared toast #825

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import helium314.keyboard.latin.LastComposedWord;
import helium314.keyboard.latin.LatinIME;
import helium314.keyboard.latin.NgramContext;
import helium314.keyboard.latin.R;
import helium314.keyboard.latin.RichInputConnection;
import helium314.keyboard.latin.Suggest;
import helium314.keyboard.latin.Suggest.OnGetSuggestedWordsCallback;
Expand Down Expand Up @@ -738,6 +739,7 @@ private void handleFunctionalEvent(final Event event, final InputTransaction inp
break;
case KeyCode.CLIPBOARD_CLEAR_HISTORY:
mLatinIME.getClipboardHistoryManager().clearHistory();
KeyboardSwitcher.getInstance().showToast(mLatinIME.getString(R.string.toast_message_clear_clipboard), true);
break;
case KeyCode.CLIPBOARD_CUT:
if (mConnection.hasSelection()) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -832,4 +832,6 @@ New dictionary:
<string name="var_toolbar_direction_summary">Reverse direction when a right-to-left keyboard subtype is selected</string>
<!-- Toast message shown when content is copied to the clipboard -->
<string name="toast_msg_clipboard_copy">Content copied</string>
<!-- Toast message shown when clipboard history is cleared -->
<string name="toast_message_clear_clipboard">Clipboard cleared</string>
</resources>