mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 23:12:51 +00:00
Don't show "Export all groups" option if there are no groups
This commit is contained in:
parent
fd5a0390f0
commit
282f85fb3b
2 changed files with 12 additions and 6 deletions
|
@ -52,6 +52,7 @@ import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import javax.crypto.Cipher;
|
import javax.crypto.Cipher;
|
||||||
|
|
||||||
|
@ -173,12 +174,16 @@ public class ImportExportPreferencesFragment extends PreferencesFragment {
|
||||||
passwordInfoText.setVisibility(checkBoxEncrypt.isChecked() && isBackupPasswordSet ? View.VISIBLE : View.GONE);
|
passwordInfoText.setVisibility(checkBoxEncrypt.isChecked() && isBackupPasswordSet ? View.VISIBLE : View.GONE);
|
||||||
});
|
});
|
||||||
|
|
||||||
for (String group: _vaultManager.getVault().getGroups()) {
|
TreeSet<String> groups = _vaultManager.getVault().getGroups();
|
||||||
|
if (groups.size() > 0) {
|
||||||
|
checkBoxExportAllGroups.setVisibility(View.VISIBLE);
|
||||||
|
for (String group: groups) {
|
||||||
CheckBox box = new CheckBox(requireContext());
|
CheckBox box = new CheckBox(requireContext());
|
||||||
box.setText(group);
|
box.setText(group);
|
||||||
box.setChecked(false);
|
box.setChecked(false);
|
||||||
groupsSelection.addView(box);
|
groupsSelection.addView(box);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AlertDialog dialog = new AlertDialog.Builder(requireContext())
|
AlertDialog dialog = new AlertDialog.Builder(requireContext())
|
||||||
.setTitle(R.string.pref_export_summary)
|
.setTitle(R.string.pref_export_summary)
|
||||||
|
|
|
@ -73,7 +73,8 @@
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:text="@string/export_all_groups"
|
android:text="@string/export_all_groups"
|
||||||
android:checked="true"/>
|
android:checked="true"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/select_groups_hint"
|
android:id="@+id/select_groups_hint"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue