mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-19 08:20:15 +00:00
Prevent saving of recent emojis when in incognito mode (fixes #521)
This commit is contained in:
parent
1bfb6e2273
commit
6eb8134b6c
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,7 @@ import org.dslul.openboard.inputmethod.latin.R;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import org.dslul.openboard.inputmethod.latin.settings.Settings;
|
||||
|
||||
final class EmojiPalettesAdapter extends RecyclerView.Adapter<EmojiPalettesAdapter.ViewHolder>{
|
||||
private static final String TAG = EmojiPalettesAdapter.class.getSimpleName();
|
||||
|
@ -57,6 +58,10 @@ final class EmojiPalettesAdapter extends RecyclerView.Adapter<EmojiPalettesAdapt
|
|||
}
|
||||
|
||||
public void addRecentKey(final Key key) {
|
||||
if (Settings.getInstance().getCurrent().mIncognitoModeEnabled) {
|
||||
// We do not want to log recent keys while being in incognito
|
||||
return;
|
||||
}
|
||||
if (mEmojiCategory.isInRecentTab()) {
|
||||
mRecentsKeyboard.addPendingKey(key);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue