mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 15:02:54 +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.Random;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
|
||||
|
@ -173,12 +174,16 @@ public class ImportExportPreferencesFragment extends PreferencesFragment {
|
|||
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());
|
||||
box.setText(group);
|
||||
box.setChecked(false);
|
||||
groupsSelection.addView(box);
|
||||
}
|
||||
}
|
||||
|
||||
AlertDialog dialog = new AlertDialog.Builder(requireContext())
|
||||
.setTitle(R.string.pref_export_summary)
|
||||
|
|
|
@ -73,7 +73,8 @@
|
|||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/export_all_groups"
|
||||
android:checked="true"/>
|
||||
android:checked="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_groups_hint"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue