File tree Expand file tree Collapse file tree
src/main/kotlin/com/simplemobiletools/calendar/pro/adapters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ android {
7070}
7171
7272dependencies {
73- implementation ' com.github.SimpleMobileTools:Simple-Commons:b30a1e0b37 '
73+ implementation ' com.github.SimpleMobileTools:Simple-Commons:d04f40487b '
7474 implementation ' androidx.multidex:multidex:2.0.1'
7575 implementation ' androidx.constraintlayout:constraintlayout:2.1.3'
7676 implementation ' androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class ManageEventTypesAdapter(
3838 }
3939
4040 when (id) {
41- R .id.cab_edit -> itemClick.invoke(getSelectedItems().first() )
41+ R .id.cab_edit -> editEventType( )
4242 R .id.cab_delete -> askConfirmDelete()
4343 }
4444 }
@@ -90,6 +90,7 @@ class ManageEventTypesAdapter(
9090 }
9191
9292 private fun showPopupMenu (view : View , eventType : EventType ) {
93+ finishActMode()
9394 val theme = activity.getPopupMenuTheme()
9495 val contextTheme = ContextThemeWrapper (activity, theme)
9596
@@ -116,11 +117,16 @@ class ManageEventTypesAdapter(
116117 }
117118
118119 private fun executeItemMenuOperation (eventTypeId : Int , callback : () -> Unit ) {
119- finishActMode ()
120+ selectedKeys.clear ()
120121 selectedKeys.add(eventTypeId)
121122 callback()
122123 }
123124
125+ private fun editEventType () {
126+ itemClick.invoke(getSelectedItems().first())
127+ finishActMode()
128+ }
129+
124130 private fun askConfirmDelete () {
125131 val eventTypes = eventTypes.filter { selectedKeys.contains(it.id?.toInt()) }.map { it.id } as ArrayList <Long >
126132
You can’t perform that action at this time.
0 commit comments