@@ -46,7 +46,6 @@ public class LoginFragment extends Fragment {
46
46
Button loginButton ;
47
47
String email , password ;
48
48
SharedPreferences .Editor sharedPreferenceEditor ;
49
- SharedPreferences preferences ;
50
49
ProgressDialog progressDialog ;
51
50
52
51
@ Override
@@ -61,7 +60,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
61
60
skipLogin = rootView .findViewById (R .id .skip_login );
62
61
loginButton = rootView .findViewById (R .id .login_button );
63
62
sharedPreferenceEditor = PreferenceManager .getDefaultSharedPreferences (getContext ()).edit ();
64
- preferences = PreferenceManager .getDefaultSharedPreferences (getActivity ());
65
63
return rootView ;
66
64
}
67
65
@@ -71,13 +69,6 @@ public void onViewCreated(final View view, @Nullable Bundle savedInstanceState)
71
69
//you can set the title for your toolbar here for different fragments different titles
72
70
getActivity ().setTitle (R .string .saar_login );
73
71
74
- if (preferences .getBoolean (Constant .SKIP_LOGIN , false )) {
75
- Intent intent = new Intent (getActivity (), MainActivity .class );
76
- intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TOP );
77
- startActivity (intent );
78
- getActivity ().finish ();
79
- }
80
-
81
72
verifyOTP .setOnClickListener (new View .OnClickListener () {
82
73
@ Override
83
74
public void onClick (View v ) {
@@ -96,8 +87,6 @@ public void onClick(View v) {
96
87
skipLogin .setOnClickListener (new View .OnClickListener () {
97
88
@ Override
98
89
public void onClick (View v ) {
99
- sharedPreferenceEditor .putBoolean (Constant .SKIP_LOGIN , true );
100
- sharedPreferenceEditor .apply ();
101
90
Intent intent = new Intent (getActivity (), MainActivity .class );
102
91
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TOP );
103
92
startActivity (intent );
0 commit comments