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

DM tab에 나타나는 DM user 최신화 #87

Open
Jake1152 opened this issue Jun 29, 2023 · 0 comments
Open

DM tab에 나타나는 DM user 최신화 #87

Jake1152 opened this issue Jun 29, 2023 · 0 comments

Comments

@Jake1152
Copy link
Member

현재 갱신되는 시점은 DM tab을 선택했을 때 기존에 DM list에 있는 유저들이 갱신 된다

하지만 DM tab이 선택된 상황에서 다른 유저가 profile에서 값을 변경하면 다시 DM tab을 다시 껐다가 켜지 않는 이상 변경된 값이 최신화 되지 않는다.

여기서 이슈

  • DM list에 있는 특정 유저를 클릭해서 DM chat UI를 띄울 때 갱신하고자 하였다. 띄울 때는 modal을 이용해서 한다.

  • modal을 띄우는 함수에 DM유저의 프로필을 최신화하는 로직을 넣으면 modal이 고장나버린다.

  • 그러므로 최신화를 할 수 없다.

  • 할수 있는 방법

  1. modal에서 할 수 있는 별도 방법을 어떻게든 찾는다 (하지만 얼마나 걸릴지 모른다. 이 부분에 이렇게 시간을 쓸 의미가 있는지 싶다)

  2. DM chat UI에서 프로필 정보를 최신화 하는 방법을 쓴다
    하지만 DM tab에서는 갱신되지 않은 값이 있어서 DM chat UI에는 갱신된 값이 있어서 둘이 달라진다

  3. DM tab을 클릭할때 이미 갱신되니까 그것으로 냅둔다.
    3-1 DM tab의 갱신주기를 Friend list처럼 5초마다 한다
    3-1-1 DM tab에 등록된 유저들마다 다 찾아보고 갱신하는게 부담스럽기는 하다. DM tab에 있는 유저를 제거하는 로직을 넣는다. slack처럼 되게 하려면 DB를 쓰거나 Redis를 쓰거나 다른 방식을 써서 서버측에 저장할 필요가 있다.

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

1 participant