Delete group button now works properly

pull/120/head
Michael Schättgen 6 years ago
parent feeada3e2d
commit 6db8260f4a

@ -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) {
_db.removeGroup(group);
groups.remove(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…
Cancel
Save