EGOR-IND commented on a change in pull request #156:
URL: https://github.com/apache/fineract-cn-mobile/pull/156#discussion_r596591389



##########
File path: 
app/src/main/java/org/apache/fineract/ui/online/groups/creategroup/AddGroupMemberStepFragment.kt
##########
@@ -108,17 +108,36 @@ class AddGroupMemberStepFragment : 
FineractBaseFragment(), Step, NameListAdapter
                         .addErrorCallback { etNewMember.error = it }.check()) {
             if (currentAction == GroupAction.CREATE) {
                 members.add(etNewMember.text.toString())
+                hideAddMemberView()
             } else {
-                members[editItemPosition] = etNewMember.text.toString()
+                if (members[editItemPosition] != etNewMember.text.toString()) {
+                    MaterialDialog.Builder().init(context).apply {
+                        
setTitle(getString(R.string.dialog_title_confirm_updation))
+                        
setMessage(getString(R.string.dialog_message_confirm_name_updation, 
members[editItemPosition]))
+                        setPositiveButton(getString(R.string.update)
+                        ) { dialog: DialogInterface?, _ ->
+                            members[editItemPosition] = 
etNewMember.text.toString()
+                            hideAddMemberView()
+                            dialog?.dismiss()
+                        }
+                        
setNegativeButton(getString(R.string.dialog_action_cancel))
+                        createMaterialDialog()
+                    }.run { show() }

Review comment:
       Ooh okay i got what you saying, you mean to make a method accessible for 
both update and delete in a fragment. I'll push the changes soon. Thanks for 
the suggestion.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to