Merge pull request #758 from Ullas-Aithal/feature/hideIssuerlabel
Added option to hide issuer label #678
This commit is contained in:
commit
94e3062c21
6 changed files with 17 additions and 3 deletions
|
@ -482,7 +482,8 @@ public class MainActivity extends BaseActivity
|
|||
key.equals(getString(R.string.settings_key_tag_functionality)) ||
|
||||
key.equals(getString(R.string.settings_key_label_highlight_token)) ||
|
||||
key.equals(getString(R.string.settings_key_card_layout)) ||
|
||||
key.equals(getString(R.string.settings_key_hide_global_timeout))) {
|
||||
key.equals(getString(R.string.settings_key_hide_global_timeout)) ||
|
||||
key.equals(getString(R.string.settings_key_hide_issuer))) {
|
||||
recreateActivity = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -580,6 +580,10 @@ public class Settings {
|
|||
return getBoolean(R.string.settings_key_focus_search_on_start, false);
|
||||
}
|
||||
|
||||
public boolean isHideIssuerEnabled() {
|
||||
return getBoolean(R.string.settings_key_hide_issuer, false);
|
||||
}
|
||||
|
||||
public Constants.TapMode getTapSingle() {
|
||||
String singleTap = getString(R.string.settings_key_tap_single, R.string.settings_default_tap_single);
|
||||
return Constants.TapMode.valueOf(singleTap.toUpperCase(Locale.ENGLISH));
|
||||
|
|
|
@ -180,7 +180,7 @@ public class EntryViewHolder extends RecyclerView.ViewHolder
|
|||
String contentHint = "";
|
||||
|
||||
String issuerText = entry.getIssuer();
|
||||
if (!TextUtils.isEmpty(issuerText)) {
|
||||
if (!TextUtils.isEmpty(issuerText) && !settings.isHideIssuerEnabled()) {
|
||||
issuer.setText(issuerText);
|
||||
issuer.setVisibility(View.VISIBLE);
|
||||
|
||||
|
@ -199,7 +199,7 @@ public class EntryViewHolder extends RecyclerView.ViewHolder
|
|||
label.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(issuerText) && !TextUtils.isEmpty(labelText)) {
|
||||
if (!TextUtils.isEmpty(issuerText) && !TextUtils.isEmpty(labelText) && !settings.isHideIssuerEnabled()) {
|
||||
separator.setVisibility(View.VISIBLE);
|
||||
|
||||
contentHint = issuerText + " - " + labelText;
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<string name="settings_key_hide_global_timeout" translatable="false">pref_hide_global_timeout</string>
|
||||
<string name="settings_key_show_individual_timeouts" translatable="false">pref_show_individual_timeouts</string>
|
||||
<string name="settings_key_focus_search_on_start" translatable="false">pref_focus_search_on_start</string>
|
||||
<string name="settings_key_hide_issuer" translatable="false">pref_hide_issuer</string>
|
||||
|
||||
<string name="settings_key_backup_append_date_time" translatable="false">pref_backup_append_date_time</string>
|
||||
<string name="settings_key_backup_ask" translatable="false">pref_backup_ask</string>
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
<string name="settings_title_hide_global_timeout">Hide global timeout bar</string>
|
||||
<string name="settings_title_show_individual_timeouts">Show individual timeouts</string>
|
||||
<string name="settings_title_focus_search_on_start">Focus search on app start</string>
|
||||
<string name="settings_title_hide_issuer">Hide Issuer</string>
|
||||
|
||||
<string name="settings_title_backup_append_date">Append date to filename</string>
|
||||
<string name="settings_title_backup_ask">Ask for filename</string>
|
||||
|
@ -88,6 +89,7 @@
|
|||
<string name="settings_desc_show_individual_timeouts">Show an individual timeout bar for every entry.
|
||||
This can slow down the app, only enable if really necessary.</string>
|
||||
<string name="settings_desc_focus_search_on_start">Focus the search immediately after opening the app.</string>
|
||||
<string name="settings_desc_hide_issuer">Hides issuer label on each card</string>
|
||||
|
||||
<string name="settings_desc_backup_append_date">Append the current date and time to the suggested
|
||||
backup filename</string>
|
||||
|
|
|
@ -188,6 +188,12 @@
|
|||
android:summary="@string/settings_desc_hide_global_timeout"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/settings_key_hide_issuer"
|
||||
android:title="@string/settings_title_hide_issuer"
|
||||
android:summary="@string/settings_desc_hide_issuer"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/settings_key_show_individual_timeouts"
|
||||
android:title="@string/settings_title_show_individual_timeouts"
|
||||
|
|
Loading…
Reference in a new issue