Commit b6bfd5bf authored by Mygod's avatar Mygod

Fix navigations in ProfileManagerActivity

parent f9194df5
...@@ -114,12 +114,14 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic ...@@ -114,12 +114,14 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic
finish finish
} }
def onKey(v: View, keyCode: Int, event: KeyEvent) = if (event.getAction == KeyEvent.ACTION_UP) keyCode match { def onKey(v: View, keyCode: Int, event: KeyEvent) = if (event.getAction == KeyEvent.ACTION_DOWN) keyCode match {
case KeyEvent.KEYCODE_DPAD_LEFT => case KeyEvent.KEYCODE_DPAD_LEFT =>
val index = getAdapterPosition val index = getAdapterPosition
profilesAdapter.remove(index) if (index >= 0) {
undoManager.remove(index, item) profilesAdapter.remove(index)
true undoManager.remove(index, item)
true
} else false
case _ => false case _ => false
} else false } else false
} }
......
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