Commit c4a62ea8 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix wrong indentation.

parent aa269d78
...@@ -111,8 +111,8 @@ class LoginPresenter @Inject constructor(private val view: LoginView, ...@@ -111,8 +111,8 @@ class LoginPresenter @Inject constructor(private val view: LoginView,
exception.message?.let { exception.message?.let {
view.showMessage(it) view.showMessage(it)
}.ifNull { }.ifNull {
view.showGenericErrorMessage() view.showGenericErrorMessage()
} }
} }
} }
} finally { } finally {
......
...@@ -50,16 +50,10 @@ class SignupPresenter @Inject constructor(private val view: SignupView, ...@@ -50,16 +50,10 @@ class SignupPresenter @Inject constructor(private val view: SignupView,
view.showLoading() view.showLoading()
try { try {
client.signup( // TODO This function returns a user so should we save it?
email, client.signup(email, name, username, password)
name, // TODO This function returns a user token so should we save it?
username, client.login(username, password)
password
) // TODO This function returns a user so should we save it?
client.login(
username,
password
) // TODO This function returns a user token so should we save it?
val me = client.me() val me = client.me()
localRepository.save(LocalRepository.USERNAME_KEY, me.username) localRepository.save(LocalRepository.USERNAME_KEY, me.username)
registerPushToken() registerPushToken()
...@@ -68,8 +62,8 @@ class SignupPresenter @Inject constructor(private val view: SignupView, ...@@ -68,8 +62,8 @@ class SignupPresenter @Inject constructor(private val view: SignupView,
exception.message?.let { exception.message?.let {
view.showMessage(it) view.showMessage(it)
}.ifNull { }.ifNull {
view.showGenericErrorMessage() view.showGenericErrorMessage()
} }
} finally { } finally {
view.hideLoading() view.hideLoading()
......
...@@ -58,8 +58,8 @@ class TwoFAPresenter @Inject constructor(private val view: TwoFAView, ...@@ -58,8 +58,8 @@ class TwoFAPresenter @Inject constructor(private val view: TwoFAView,
exception.message?.let { exception.message?.let {
view.showMessage(it) view.showMessage(it)
}.ifNull { }.ifNull {
view.showGenericErrorMessage() view.showGenericErrorMessage()
} }
} }
} finally { } finally {
view.hideLoading() view.hideLoading()
......
...@@ -97,9 +97,7 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView, ...@@ -97,9 +97,7 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
view.showMessage(it) view.showMessage(it)
}.ifNull { }.ifNull {
view.showGenericErrorMessage() view.showGenericErrorMessage()
view.showGenericErrorMessage() }
}
view.enableMessageInput() view.enableMessageInput()
} }
} }
......
...@@ -46,8 +46,8 @@ class PinnedMessagesPresenter @Inject constructor(private val view: PinnedMessag ...@@ -46,8 +46,8 @@ class PinnedMessagesPresenter @Inject constructor(private val view: PinnedMessag
view.showPinnedMessages(messageList) view.showPinnedMessages(messageList)
view.hideLoading() view.hideLoading()
}.ifNull { }.ifNull {
Timber.e("Couldn't find a room with id: $roomId at current server.") Timber.e("Couldn't find a room with id: $roomId at current server.")
} }
} catch (e: RocketChatException) { } catch (e: RocketChatException) {
Timber.e(e) Timber.e(e)
} }
......
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