mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-24 07:46:07 +00:00
Only copy code if not hidden
This commit is contained in:
parent
282f85fb3b
commit
542a8c6f8c
2 changed files with 15 additions and 2 deletions
|
@ -43,6 +43,7 @@ public class EntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
private List<VaultEntry> _selectedEntries;
|
||||
private Map<UUID, Integer> _usageCounts;
|
||||
private VaultEntry _focusedEntry;
|
||||
private VaultEntry _copiedEntry;
|
||||
private Preferences.CodeGrouping _codeGroupSize;
|
||||
private boolean _showAccountName;
|
||||
private boolean _showIcon;
|
||||
|
@ -420,18 +421,26 @@ public class EntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
boolean handled = false;
|
||||
|
||||
if (_selectedEntries.isEmpty()) {
|
||||
if (_copyOnTap) {
|
||||
boolean copiedThisClick = false;
|
||||
|
||||
if (_copyOnTap && !entryHolder.isHidden() && !(entry == _copiedEntry)) {
|
||||
_view.onEntryCopy(entry);
|
||||
entryHolder.animateCopyText();
|
||||
_copiedEntry = entry;
|
||||
copiedThisClick = true;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if (_highlightEntry || _tempHighlightEntry || _tapToReveal) {
|
||||
if (_focusedEntry == entry) {
|
||||
if (_focusedEntry == entry && !copiedThisClick) {
|
||||
resetFocus();
|
||||
_copiedEntry = null;
|
||||
handled = true;
|
||||
} else {
|
||||
focusEntry(entry, _tapToRevealTime);
|
||||
}
|
||||
} else {
|
||||
_copiedEntry = null;
|
||||
}
|
||||
|
||||
incrementUsageCount(entry);
|
||||
|
|
|
@ -308,6 +308,10 @@ public class EntryHolder extends RecyclerView.ViewHolder {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isHidden() {
|
||||
return _hidden;
|
||||
}
|
||||
|
||||
public void setPaused(boolean paused) {
|
||||
_paused = paused;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue