Skip to content

Commit

Permalink
Add NEW_GROUP placeholder type for group models to fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbakker committed Sep 24, 2024
1 parent 8e3279b commit c559ed9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ private void startAssignGroupsDialog() {

Collection<VaultGroup> groups = _vaultManager.getVault().getUsedGroups();
List<VaultGroupModel> 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);

Expand Down

0 comments on commit c559ed9

Please sign in to comment.