Houseclub icon indicating copy to clipboard operation
Houseclub copied to clipboard

Invite and search users feature

Open bit-world opened this issue 4 years ago • 18 comments

that's better?

bit-world avatar Feb 23 '21 20:02 bit-world

  • Still has Russian strings from another pull request
  • The contact search part makes no sense. You query the content provider every time the search query changes, you then filter the rows using a regular expression for no good reason, and you compile it twice for each row processed. If that's not bad enough, you do it all on the UI thread. You could load the full contact list once and then filter it without any additional content provider queries.
  • The buttons in the confirmation dialog use hardcoded strings

grishka avatar Feb 23 '21 20:02 grishka

Could u explain how to use it as a code? How I could add it to app?

lanalabinsta avatar Feb 23 '21 20:02 lanalabinsta

and you compile it twice for each row processed

Why twice?

I'll fix the rest

bit-world avatar Feb 23 '21 20:02 bit-world

Looks good and better than #105 👋 🤚🤙🤙🤙

alexeysi avatar Feb 23 '21 22:02 alexeysi

This model is not available in your pull request

import me.grishka.houseclub.api.model.Contact;

impozzible avatar Feb 23 '21 22:02 impozzible

This model is not available in your pull request

import me.grishka.houseclub.api.model.Contact;

can you check, is it ok now?

bit-world avatar Feb 23 '21 22:02 bit-world

This model is not available in your pull request import me.grishka.houseclub.api.model.Contact;

can you check, is it ok now?

`

    public class Contact {
public String name, phone_number;
public Contact(){
}

public Contact(String name, String phone_number){
	this.name=name;
	this.phone_number=phone_number;
}

     }

`

phone_number should be phone, because

if (query.equals("") || ( pattern.matcher(contact.name + contact.phone).find())) { FullUser user = new FullUser(); user.name = contact.name; user.bio = contact.phone; users.add(user); i++; if(i > limit) break; }

impozzible avatar Feb 23 '21 22:02 impozzible

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}

bit-world avatar Feb 23 '21 22:02 bit-world

me.grishka.houseclub.api.model.FullUser;

this is not my class, it is from origin

bit-world avatar Feb 23 '21 22:02 bit-world

Also, you need to push HomeFragment.java

impozzible avatar Feb 23 '21 22:02 impozzible

And please add a Navigation to your InviteListFragment and SearchListFragment into HomeFragment to have an access to your new features.

Done

bit-world avatar Feb 23 '21 23:02 bit-world

On my end page is just rolling

impozzible avatar Feb 23 '21 23:02 impozzible

Oh never mind, that was because i had thousands of contacts on my device

impozzible avatar Feb 24 '21 00:02 impozzible

Oh never mind, that was because i had thousands of contacts on my device Me too, but it works fine....

alexeysi avatar Feb 24 '21 00:02 alexeysi

Hey you can use API "get_suggested_invites" put phone number for check in_app and is_invited status it will look good for filter fitting row

RikuAlice01 avatar Feb 24 '21 00:02 RikuAlice01

UserListFragment.java sometimes getting zero length data array and out of bounds exception in getImageURL()

Please use following implementation...

@Override public String getImageURL(int position, int image){ if (data.size()>0) return data.get(position).photoUrl; return null; }

alexeysi avatar Feb 24 '21 04:02 alexeysi

Hi i tested this feature:

  • invitation - it look that it is work.
  • notificiation page - first time it is display, but than this page always fall

josefjebavy avatar Feb 25 '21 18:02 josefjebavy

Hi i tested this feature:

  • invitation - it look that it is work. +1. Confirming, I also used my invite and it passed to another android user successfully.
  • notificiation page - first time it is display, but than this page always fall Try to change HomeFragment.java line143: to return false; instead of true;

alexeysi avatar Feb 26 '21 18:02 alexeysi