Fixed The Fucking Email Buggit push
This commit is contained in:
parent
cba527375e
commit
1a7f177cd2
3 changed files with 6 additions and 17 deletions
|
@ -65,14 +65,11 @@ public class SettingsFragment extends Fragment implements View.OnClickListener,
|
|||
this.parent = (MainActivity)getActivity();
|
||||
Utils.showLoadingDialog(parent, "Just a sec...", "");
|
||||
this.user = parent.getUser();
|
||||
Log.d(TAG, "onCreateView: "+user.toString());
|
||||
this.cameraBtn = (ImageButton) view.findViewById(R.id.btn_camera);
|
||||
this.cameraBtn.setOnClickListener(this);
|
||||
this.avatarImage = (ImageView) view.findViewById(R.id.settings_userAvater_iamgeView);
|
||||
this.txt_email = (EditText)view.findViewById(R.id.txt_email);
|
||||
this.txt_email.addTextChangedListener(this);
|
||||
this.txt_password = (EditText)view.findViewById(R.id.txt_password);
|
||||
this.txt_password.addTextChangedListener(this);
|
||||
this.txt_username = (EditText)view.findViewById(R.id.txt_username);
|
||||
this.lbl_num_of_notes = (TextView)view.findViewById(R.id.lbl_num_of_notes);
|
||||
this.lbl_num_of_liked = (TextView)view.findViewById(R.id.lbl_num_of_liked);
|
||||
|
@ -85,12 +82,13 @@ public class SettingsFragment extends Fragment implements View.OnClickListener,
|
|||
Utils.URLtoImageView(avatarImage, user.getAvatar());
|
||||
this.txt_username.setText(""+user.getUsername());
|
||||
this.txt_password.setText(""+user.getPassword());
|
||||
Log.d(TAG, "onCreateView: The FUCKING EMAIL IS --------------->>>" + user.getEmail());
|
||||
this.txt_email.setText(""+user.getEmail());
|
||||
this.txt_email.setText(""+parent.getUser().getEmail());
|
||||
|
||||
this.lbl_num_of_notes.setText(""+user.getNumber_of_notes()); //TODO
|
||||
this.lbl_num_of_liked.setText(""+user.getLiked_notes().size());
|
||||
|
||||
this.txt_password.addTextChangedListener(this);
|
||||
this.txt_email.addTextChangedListener(this);
|
||||
|
||||
Utils.dismissLoadingDialog();
|
||||
return view;
|
||||
|
|
|
@ -63,6 +63,7 @@ public class User {
|
|||
break;
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "User: Constructor Created:\n"+this.toString());
|
||||
}
|
||||
|
||||
public int getNumber_of_notes() {
|
||||
|
@ -90,7 +91,7 @@ public class User {
|
|||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
return this.email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
|
@ -109,18 +110,11 @@ public class User {
|
|||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public Vector<String> getLiked_notes() {
|
||||
return liked_notes;
|
||||
}
|
||||
|
||||
public void setLiked_notes(Vector<String> liked_notes) {
|
||||
this.liked_notes = liked_notes;
|
||||
}
|
||||
|
||||
private void createArrayNotes(String s) {
|
||||
Log.d(TAG, "createArrayNotes:" + s);
|
||||
String[] noteIds = s.split("\\|");
|
||||
|
@ -128,7 +122,6 @@ public class User {
|
|||
Log.d(TAG, "createArrayNotes: Note ID " + i + ": " + noteIds[i]);
|
||||
liked_notes.add(noteIds[i]);
|
||||
}
|
||||
Log.d(TAG, "createArrayNotes: =================: == Done With Note IDS");
|
||||
}
|
||||
|
||||
public String Serialise(){
|
||||
|
@ -151,13 +144,11 @@ public class User {
|
|||
}
|
||||
|
||||
public void updateUser(final MainActivity activity){
|
||||
Log.d(TAG, "updateUser: ================================");
|
||||
VolleyUtilSingleton.getInstance(activity).post(Utils.BASE_URL + "/user/upsert", this.toJSON(), new Response.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
try {
|
||||
if(response.get("status").equals("OK")){
|
||||
Log.d(TAG, "onResponse: In OKOKOKOK");
|
||||
activity.updateNavAvatar();
|
||||
Utils.updateUserSharedPref(self.Serialise());
|
||||
activity.updateNavAvatar();
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
android:ems="10"
|
||||
android:id="@+id/txt_email"
|
||||
android:hint="Email"
|
||||
android:inputType="none|text" />
|
||||
android:inputType="textEmailAddress" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
|
Loading…
Reference in a new issue