diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java b/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java
index 82e1ff7a..abb55307 100644
--- a/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java
+++ b/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java
@@ -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;
}
}
diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java b/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java
index d351a3dc..4337ecad 100644
--- a/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java
+++ b/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java
@@ -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));
diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java b/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java
index 23c7c715..e277258c 100644
--- a/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java
+++ b/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java
@@ -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;
diff --git a/app/src/main/res/values/settings.xml b/app/src/main/res/values/settings.xml
index b7b2fce0..0ada7e6f 100644
--- a/app/src/main/res/values/settings.xml
+++ b/app/src/main/res/values/settings.xml
@@ -40,6 +40,7 @@
pref_hide_global_timeout
pref_show_individual_timeouts
pref_focus_search_on_start
+ pref_hide_issuer
pref_backup_append_date_time
pref_backup_ask
diff --git a/app/src/main/res/values/strings_settings.xml b/app/src/main/res/values/strings_settings.xml
index 4642fc46..6614e545 100644
--- a/app/src/main/res/values/strings_settings.xml
+++ b/app/src/main/res/values/strings_settings.xml
@@ -39,6 +39,7 @@
Hide global timeout bar
Show individual timeouts
Focus search on app start
+ Hide Issuer
Append date to filename
Ask for filename
@@ -88,6 +89,7 @@
Show an individual timeout bar for every entry.
This can slow down the app, only enable if really necessary.
Focus the search immediately after opening the app.
+ Hides issuer label on each card
Append the current date and time to the suggested
backup filename
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 5f0c04fa..42093571 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -188,6 +188,12 @@
android:summary="@string/settings_desc_hide_global_timeout"
android:defaultValue="false" />
+
+