Commit 292c76b2 authored by Mygod's avatar Mygod

Fix remove snackbar

parent a67c2931
......@@ -148,7 +148,13 @@ class CustomRulesFragment extends ToolbarFragment with Toolbar.OnMenuItemClickLi
def remove(i: Int) {
val j = i - acl.subnets.size
if (j < 0) acl.subnets.remove(i) else acl.proxyHostnames.remove(j)
if (j < 0) {
undoManager.remove((i, acl.subnets(i)))
acl.subnets.remove(i)
} else {
undoManager.remove((j, acl.proxyHostnames(j)))
acl.proxyHostnames.remove(j)
}
notifyItemRemoved(i)
apply()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment