From c559ed9e569e7c659312d6de19432d355d565729 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Tue, 24 Sep 2024 22:01:45 +0200 Subject: [PATCH] Add NEW_GROUP placeholder type for group models to fix the build --- .../java/com/beemdevelopment/aegis/GroupPlaceholderType.java | 3 +++ .../main/java/com/beemdevelopment/aegis/ui/MainActivity.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/beemdevelopment/aegis/GroupPlaceholderType.java b/app/src/main/java/com/beemdevelopment/aegis/GroupPlaceholderType.java index a42b5f44d..6169e808d 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/GroupPlaceholderType.java +++ b/app/src/main/java/com/beemdevelopment/aegis/GroupPlaceholderType.java @@ -2,12 +2,15 @@ public enum GroupPlaceholderType { ALL, + NEW_GROUP, NO_GROUP; public int getStringRes() { switch (this) { case ALL: return R.string.all; + case NEW_GROUP: + return R.string.new_group; case NO_GROUP: return R.string.no_group; default: diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java b/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java index af88133c1..ec82fcbb5 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java @@ -493,7 +493,7 @@ private void startAssignGroupsDialog() { Collection groups = _vaultManager.getVault().getUsedGroups(); List groupModels = new ArrayList<>(); - groupModels.add(new VaultGroupModel(getString(R.string.new_group))); + groupModels.add(new VaultGroupModel(this, GroupPlaceholderType.NEW_GROUP)); groupModels.addAll(groups.stream().map(VaultGroupModel::new).collect(Collectors.toList())); DropdownHelper.fillDropdown(this, groupsSelection, groupModels);