-
Notifications
You must be signed in to change notification settings - Fork 396
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
Invite and search users feature #144
base: master
Are you sure you want to change the base?
Conversation
|
Could u explain how to use it as a code? How I could add it to app? |
Why twice? I'll fix the rest |
ContactsContract.CommonDataKinds.Phone.NUMBER)); | ||
|
||
if (query.equals("") || ( | ||
Pattern.compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE).matcher(name).find() || |
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.
complied 1st time
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.
Could it be like this?
--- a/Houseclub/src/main/java/me/grishka/houseclub/fragments/InviteListFragment.java
+++ b/Houseclub/src/main/java/me/grishka/houseclub/fragments/InviteListFragment.java
@@ -116,9 +116,10 @@ public class InviteListFragment extends SearchListFragment {
String phoneNo = pCur.getString(pCur.getColumnIndex(
ContactsContract.CommonDataKinds.Phone.NUMBER));
+ Pattern pattern = Pattern.compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE);
if (query.equals("") || (
- Pattern.compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE).matcher(name).find() ||
- Pattern.compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE).matcher(phoneNo).find())) {
+ pattern.matcher(name).find() ||
+ pattern.matcher(phoneNo).find())) {
FullUser u = new FullUser();
u.name = name;
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.
thanx, now understood
|
||
if (query.equals("") || ( | ||
Pattern.compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE).matcher(name).find() || | ||
Pattern.compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE).matcher(phoneNo).find())) { |
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.
compiled 2nd time
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.
Is there anyone who can send me invitation
Looks good and better than #105 👋 🤚🤙🤙🤙 |
This model is not available in your pull request import me.grishka.houseclub.api.model.Contact; |
can you check, is it ok now? |
`
` phone_number should be phone, because
|
the correct option "phone_number", such response from API, initially did not know, I had to fix it ClubhouseAPI: Raw response: {"num_invites":0,"suggested_invites":[{"phone_number":"+000000","in_app":true,"is_invited":false,"num_friends":73} |
this is not my class, it is from origin |
Also, you need to push HomeFragment.java |
Done |
On my end page is just rolling |
Oh never mind, that was because i had thousands of contacts on my device |
|
Hey you can use API "get_suggested_invites" put phone number for check in_app and is_invited status |
UserListFragment.java sometimes getting zero length data array and out of bounds exception in getImageURL() Please use following implementation... @OverRide |
} | ||
return true; | ||
return false; |
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.
Why?
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.
I'm changed this return to false independently too. Dunno why, but got some exceptions in navigation when more than 2 items in a menu...
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.
fixed
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.
@bit-world: with true here I had the same problem as @josefjebavy described, couldnt navigate twice to the same page.
<string name="button_positive">Ok</string> | ||
<string name="button_negative">Cancel</string> |
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.
These strings already exist...
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.
fixed
Toast.makeText(getContext(), getString(R.string.invite_err, ""), Toast.LENGTH_SHORT).show(); | ||
error.showToast(getContext()); |
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.
This is indented with spaces for some reason
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.
fixed
super(getActivity(), R.layout.user_list_row); | ||
|
||
name=findViewById(R.id.name); | ||
bio=findViewById(R.id.bio); | ||
followBtn=findViewById(R.id.follow_btn); | ||
photo=findViewById(R.id.photo); |
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.
And this too
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.
fixed
Hi i tested this feature:
|
|
remove other characters from the phone number
that's better?