mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-04 20:30:36 +00:00
Merge pull request #644 from alexbakker/remove-acc-name-opt
Remove the "search in account names" option and do so by default
This commit is contained in:
commit
ff450c3edf
31 changed files with 1 additions and 79 deletions
|
@ -37,10 +37,6 @@ public class Preferences {
|
|||
return _prefs.getBoolean("pref_tap_to_reveal", false);
|
||||
}
|
||||
|
||||
public boolean isSearchAccountNameEnabled() {
|
||||
return _prefs.getBoolean("pref_search_names", false);
|
||||
}
|
||||
|
||||
public boolean isEntryHighlightEnabled() {
|
||||
return _prefs.getBoolean("pref_highlight_entry", false);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,6 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
_entryListView.setListener(this);
|
||||
_entryListView.setCodeGroupSize(getPreferences().getCodeGroupSize());
|
||||
_entryListView.setShowAccountName(getPreferences().isAccountNameVisible());
|
||||
_entryListView.setSearchAccountName(getPreferences().isSearchAccountNameEnabled());
|
||||
_entryListView.setHighlightEntry(getPreferences().isEntryHighlightEnabled());
|
||||
_entryListView.setTapToReveal(getPreferences().isTapToRevealEnabled());
|
||||
_entryListView.setTapToRevealTime(getPreferences().getTapToRevealTime());
|
||||
|
@ -235,7 +234,6 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
} else if (data.getBooleanExtra("needsRefresh", false)) {
|
||||
boolean showAccountName = getPreferences().isAccountNameVisible();
|
||||
int codeGroupSize = getPreferences().getCodeGroupSize();
|
||||
boolean searchAccountName = getPreferences().isSearchAccountNameEnabled();
|
||||
boolean highlightEntry = getPreferences().isEntryHighlightEnabled();
|
||||
boolean tapToReveal = getPreferences().isTapToRevealEnabled();
|
||||
int tapToRevealTime = getPreferences().getTapToRevealTime();
|
||||
|
@ -243,7 +241,6 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
boolean copyOnTap = getPreferences().isCopyOnTapEnabled();
|
||||
_entryListView.setShowAccountName(showAccountName);
|
||||
_entryListView.setCodeGroupSize(codeGroupSize);
|
||||
_entryListView.setSearchAccountName(searchAccountName);
|
||||
_entryListView.setHighlightEntry(highlightEntry);
|
||||
_entryListView.setTapToReveal(tapToReveal);
|
||||
_entryListView.setTapToRevealTime(tapToRevealTime);
|
||||
|
|
|
@ -243,12 +243,6 @@ public class PreferencesFragment extends PreferenceFragmentCompat {
|
|||
}
|
||||
});
|
||||
|
||||
Preference searchAccountNamePreference = findPreference("pref_search_names");
|
||||
searchAccountNamePreference.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
_result.putExtra("needsRefresh", true);
|
||||
return true;
|
||||
});
|
||||
|
||||
Preference copyOnTapPreference = findPreference("pref_copy_on_tap");
|
||||
copyOnTapPreference.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
_result.putExtra("needsRefresh", true);
|
||||
|
|
|
@ -35,7 +35,6 @@ public class EntryAdapter extends RecyclerView.Adapter<EntryHolder> implements I
|
|||
private VaultEntry _focusedEntry;
|
||||
private int _codeGroupSize;
|
||||
private boolean _showAccountName;
|
||||
private boolean _searchAccountName;
|
||||
private boolean _highlightEntry;
|
||||
private boolean _tempHighlightEntry;
|
||||
private boolean _tapToReveal;
|
||||
|
@ -85,10 +84,6 @@ public class EntryAdapter extends RecyclerView.Adapter<EntryHolder> implements I
|
|||
_tapToRevealTime = number;
|
||||
}
|
||||
|
||||
public void setSearchAccountName(boolean searchAccountName) {
|
||||
_searchAccountName = searchAccountName;
|
||||
}
|
||||
|
||||
public void setHighlightEntry(boolean highlightEntry) {
|
||||
_highlightEntry = highlightEntry;
|
||||
}
|
||||
|
@ -226,7 +221,7 @@ public class EntryAdapter extends RecyclerView.Adapter<EntryHolder> implements I
|
|||
return false;
|
||||
}
|
||||
|
||||
return !issuer.contains(_searchFilter) && !(_searchAccountName && name.contains(_searchFilter));
|
||||
return !issuer.contains(_searchFilter) && !name.contains(_searchFilter);
|
||||
}
|
||||
|
||||
public void refresh(boolean hard) {
|
||||
|
|
|
@ -259,10 +259,6 @@ public class EntryListView extends Fragment implements EntryAdapter.Listener {
|
|||
_adapter.setShowAccountName(showAccountName);
|
||||
}
|
||||
|
||||
public void setSearchAccountName(boolean searchAccountName) {
|
||||
_adapter.setSearchAccountName(searchAccountName);
|
||||
}
|
||||
|
||||
public void setHighlightEntry(boolean highlightEntry) {
|
||||
_adapter.setHighlightEntry(highlightEntry);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue