Skip to content
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

RxList in Getx bindStream, but Obx keep get old data emmited #3000

Open
OpenJarvisAI opened this issue Dec 27, 2023 · 0 comments
Open

RxList in Getx bindStream, but Obx keep get old data emmited #3000

OpenJarvisAI opened this issue Dec 27, 2023 · 0 comments
Assignees

Comments

@OpenJarvisAI
Copy link

my project is a little comlicated, but I have a type binded a Stream from sql.

Each time I entered a new chat page from history, it can happens get old room messages, it's weired.

I think it caused by bindStream,

void getMessagesWithContactOrRoomMem(String roomId, bool isGroup,
{int perPage = 25, int pageNum = 0}) {
if (isGroup) {
var msgs = MyDatabase.instance()!
.messageDao
.getMessagesWithRoomMemberByRoomId(roomId,
perPage: perPage, pageNum: pageNum);
// out.stream = msgs;

  roomMsgs.bindStream(msgs);
  // return msgs;
} else {
  var msgs = MyDatabase.instance()!
      .messageDao
      .getMessagesWithContactByRoomId(roomId,
          perPage: perPage, pageNum: pageNum);
  roomMsgs.bindStream(msgs);
  // return msgs;
}

}

Help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants