-
Notifications
You must be signed in to change notification settings - Fork 682
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
Get users messages #34
Comments
Sure!
|
But if I don't know a I contacted person A, B and C. I need an overview of last chats, something like this |
So basically you are mapping over the list of users you have chatted. So you have avatar url, user name & id. In this case while mapping items call the Widget getLastMessage with the |
If I understood correctly, then in this case I have to save that list of users I've chatted with (in DB, or cache)? |
Yes! |
Whenever a chat is initiated, please check if its the first chat between the current user and the peer, if its the case, save a new instance of that chat with time reference in a firestore table called chats, also save the last message there. when the app loads, take a chat list from that table.in this case, the last message will be stored there. if this is not the first chat, just update the time and the last message sent. this was my approach |
@akiligedeon I referred your idea and did a similar thing, but one thing I am not getting is that when the user list will be retrieved with the last message, if the last message is a image, how should it be dealt with? |
Hi, Good one. I am using this project example. If current user or peer user get new message, it is coming as push notification in notification tray. Along with push notification, i want to show new message count in chat list screen as badge like whatsapp also. Attached sample image. How can i acheive this. Please help me on this. |
You can achieve using combine latest method in rx dart, by having the
mesage for each user in different document and listening to it
…On 18 Aug 2020 7:08 am, "MaheshPeri19" ***@***.***> wrote:
Hi,
Good one. I am using this project example. If current user or peer user
get new message, it is coming as push notification in notification tray.
Just i want to show new message count in chat list screen as badge like
whatsapp.
Attached sample image. How can i acheive this. Please help me on this.
[image: whatsapp_badgecount]
<https://user-images.githubusercontent.com/58836654/90476448-294c1100-e147-11ea-9c1b-2d8817eb0a71.PNG>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJYIBIQTINDYKKT5TZ6VVVTSBILGFANCNFSM4KJBX53A>
.
|
Ok. Thanks for your reply. Any other suggestion without using rx dart package ? As i am not aware of Rxdart. |
watch these two videos ,one deal with combine latest the othere deals with stream |
Thank you. i will watch. |
Thank you
Le mar. 18 août 2020 à 18:22, MaheshPeri19 <[email protected]> a
écrit :
… Thank you. i will watch.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALI3IZBARRE3EXBGEPH5YELSBKTDNANCNFSM4KJBX53A>
.
|
@Baksman i am trying to achieve something like that whatsapp like the image the guy share above but i have watch the video and i dont no how to go about it |
Is it possible from this data model to get a list of my previous chats with last message shown. Like the one in Messenger or WhatsApp after you login...
Right now you save the document in collection like idFrom - idTo ... But I am struggling to query it for a user with uid.
The text was updated successfully, but these errors were encountered: