-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new report submittion fragment #129
Changes from all commits
bcf104d
d7bd6a0
0496c6c
108e52d
7b10c9b
700bfbe
8565d32
0856c7f
59b6a1b
148cdda
18e3b18
ed55a34
13f1b7a
5822204
ba32678
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package lt.vilnius.tvarkau.backend; | ||
|
||
import android.support.annotation.VisibleForTesting; | ||
|
||
public class ApiRequest<P> { | ||
|
||
private String method; | ||
|
@@ -11,4 +13,9 @@ public ApiRequest(ApiMethod method, P params) { | |
this.id = method.getId(); | ||
this.params = params; | ||
} | ||
|
||
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) | ||
public P getParams() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's only used for tests use |
||
return params; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
package lt.vilnius.tvarkau.entity; | ||
|
||
import android.content.Context; | ||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
import com.google.gson.Gson; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
import org.threeten.bp.LocalDate; | ||
|
||
import lt.vilnius.tvarkau.utils.SharedPrefsManager; | ||
|
||
|
||
public class Profile { | ||
|
||
|
@@ -53,8 +47,16 @@ public String getMobilePhone() { | |
return mobilePhone; | ||
} | ||
|
||
public static Profile returnProfile(Context con) { | ||
return SharedPrefsManager.getInstance(con).getUserProfile(); | ||
public void setBirthday(LocalDate birthday) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are not needed you have all required data to pass to constructor |
||
this.birthday = birthday; | ||
} | ||
|
||
public void setEmail(String email) { | ||
this.email = email; | ||
} | ||
|
||
public void setMobilePhone(String mobilePhone) { | ||
this.mobilePhone = mobilePhone; | ||
} | ||
|
||
public String createJsonData() { | ||
|
@@ -73,9 +75,9 @@ public boolean equals(Object o) { | |
Profile profile = (Profile) o; | ||
|
||
return name.equals(profile.getName()) && | ||
birthday.equals(profile.getBirthday()) && | ||
email.equals(profile.getEmail()) && | ||
mobilePhone.equals(profile.getMobilePhone()); | ||
birthday.equals(profile.getBirthday()) && | ||
email.equals(profile.getEmail()) && | ||
mobilePhone.equals(profile.getMobilePhone()); | ||
} | ||
|
||
return false; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,8 @@ abstract class BaseFragment : Fragment() { | |
|
||
analytics.trackCurrentFragment(activity, this) | ||
} | ||
|
||
override fun onDestroyView() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this one so in super child classes there were lint errors, that super is not called... |
||
super.onDestroyView() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing this PR got:
Device Nexus 5x newest Android version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, good catch