mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-04 20:30:36 +00:00
Delete group button now works properly
This commit is contained in:
parent
feeada3e2d
commit
6db8260f4a
2 changed files with 13 additions and 2 deletions
|
@ -5,6 +5,7 @@ import android.os.Bundle;
|
|||
import java.util.TreeSet;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import me.impy.aegis.AegisApplication;
|
||||
|
@ -52,7 +53,15 @@ public class GroupManagerActivity extends AegisActivity implements GroupAdapter.
|
|||
|
||||
@Override
|
||||
public void onRemoveGroup(String group) {
|
||||
Dialogs.showSecureDialog(new AlertDialog.Builder(this)
|
||||
.setTitle(R.string.remove_group)
|
||||
.setMessage(R.string.remove_group_description)
|
||||
.setPositiveButton(android.R.string.yes, (dialog, whichButton) -> {
|
||||
_db.removeGroup(group);
|
||||
groups.remove(group);
|
||||
_adapter.removeGroup(group);
|
||||
})
|
||||
.setNegativeButton(android.R.string.no, null)
|
||||
.create());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,6 +133,8 @@
|
|||
<string name="password_slot_error">You must have at least one password slot</string>
|
||||
<string name="remove_slot">Remove slot</string>
|
||||
<string name="remove_slot_description">Are you sure you want to remove this slot?</string>
|
||||
<string name="remove_group">Remove group</string>
|
||||
<string name="remove_group_description">Are you sure you want to remove this group? Entries in this group will automatically switch to \'No group\'.</string>
|
||||
<string name="adding_new_slot_error">An error occurred while trying to add a new slot:</string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="lock">Lock</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue