apptentive/apptentive-kit-android

MessageCenter input fields gets reset after attaching file.

Opened this issue · 0 comments

Steps to reproduce :

  1. Enter the data into the “Name”, “Email”, and “message” input fields
  2. Tap on the “Attach” icon
  3. Choose the image to attach
  4. Observe

Actual result:
The entered data is erased.

Expected result:
The file is attached and the entered data stays on in the fields.

It is because of below method in MessageCenterActivity

override fun onResume() {
        super.onResume()
        viewModel.onMessageViewStatusChanged(true)
        handleDraftMessage(false)
        clearNotifications()
    }

onResume is called everytime the file is attached.
handleDraftMessage() resets all input fields.