Commit 922a9abd authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix more refactoring mistakes once again

parent 8247ced2
......@@ -12,7 +12,7 @@ import chat.rocket.core.internal.rest.me
import chat.rocket.core.internal.rest.updateProfile
import javax.inject.Inject
class ProfilePresenter @Inject constructor (private val view: ProfileView,
class ProfilePresenter @Inject constructor(private val view: ProfileView,
private val strategy: CancelStrategy,
serverInteractor: GetCurrentServerInteractor,
factory: RocketChatClientFactory) {
......@@ -49,7 +49,7 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView,
launchUI(strategy) {
view.showLoading()
try {
val user = client.updateProfile(myselfId, email, name, username)
val user = client.updateProfile(myselfId, email, name, null, username)
view.showProfileUpdateSuccessfullyMessage()
loadUserProfile()
} catch (exception: RocketChatException) {
......
......@@ -54,8 +54,8 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
text_username.textContent = username
text_email.textContent = email
currentName = name
currentUsername = username
currentName = username
currentUsername = name
currentEmail = email
profile_container.setVisible(true)
......@@ -92,7 +92,7 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
override fun onActionItemClicked(mode: ActionMode, menuItem: MenuItem): Boolean {
return when (menuItem.itemId) {
R.id.action_profile -> {
presenter.updateUserProfile(text_email.textContent, text_username.textContent, text_username.textContent)
presenter.updateUserProfile(text_email.textContent, text_name.textContent, text_username.textContent)
mode.finish()
true
}
......
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