Commit 51a9b57d authored by Aniket's avatar Aniket

makes suggested changes

parent 287fe196
package chat.rocket.android.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
......@@ -100,8 +99,7 @@ public class LoginActivity extends AbstractFragmentActivity implements LoginCont
} else if (BackStackHelper.FRAGMENT_TAG.equals("login")) {
LoginFragment loginFragment = (LoginFragment) getSupportFragmentManager()
.findFragmentById(getLayoutContainerForFragment());
Context loginActivityContext = this;
loginFragment.goBack(loginActivityContext);
loginFragment.goBack();
}
return true;
}
......
......@@ -26,7 +26,7 @@ public interface LoginContract {
void showTwoStepAuth();
void goBack(Context ctx);
void goBack();
}
interface Presenter extends BaseContract.Presenter<View> {
......
package chat.rocket.android.fragment.server_config
import android.content.Context
import android.os.Bundle
import android.support.constraint.ConstraintLayout
import android.support.design.widget.Snackbar
......@@ -161,8 +160,9 @@ class LoginFragment : AbstractServerConfigFragment(), LoginContract.View {
presenter.release()
super.onPause()
}
override fun goBack(ctx: Context?) {
presenter.goBack(ctx)
override fun goBack() {
presenter.goBack(context)
}
}
......@@ -33,7 +33,7 @@ class LoginPresenter(private val loginServiceConfigurationRepository: LoginServi
}
override fun goBack(ctx : Context?) {
override fun goBack(ctx: Context?) {
val context = RocketChatApplication.getInstance()
val hostname = RocketChatCache.getSelectedServerHostname()
hostname?.let {
......
package chat.rocket.android.helper;
/**
* Created by whocares on 28/12/17.
*/
public class BackStackHelper {
public static String FRAGMENT_TAG = "login";
......
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