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

Empty chat in opened on pressing hashtag in a community channel #18095

Closed
qoqobolo opened this issue Dec 6, 2023 · 4 comments · Fixed by #18111
Closed

Empty chat in opened on pressing hashtag in a community channel #18095

qoqobolo opened this issue Dec 6, 2023 · 4 comments · Fixed by #18111
Assignees
Milestone

Comments

@qoqobolo
Copy link
Contributor

qoqobolo commented Dec 6, 2023

Bug Report

Problem

The corresponding e2е failed for the first time in #18049
@ilmotta could you have a look to check if this is a regression, please?

Reproduction

  1. Create a community with several channels, e.g. #channel1 and #channel2
  2. Tag #channel1 in #channel2
  3. Press #channel1
video_2023-12-06_15-17-57.mp4

Expected behavior

You're redirected to #channel1

Actual behavior

An empty chat is opened

Additional Information

  • Status version: nightly 6/12
  • Operating System: Android, iOS
@ilmotta
Copy link
Contributor

ilmotta commented Dec 6, 2023

Will check @qoqobolo! Although I can't understand why they would fail. That PR only changed _test.cljs files that never run in production.

@ilmotta ilmotta self-assigned this Dec 6, 2023
@ilmotta
Copy link
Contributor

ilmotta commented Dec 6, 2023

@qoqobolo I bisected our commits and eventually arrived at the one that caused the regression 6ef113e

@Parveshdhull, since you have context about the fix, could you take a look? I don't fully grasp the changes introduced by PR #18066.

I could verify that commenting out the dispatch to :chat/close fixes the issue, but I don't know if that's a proper solution since the original PR introduced the dispatch as a fix.

modified   src/status_im2/navigation/events.cljs
@@ -67,8 +67,8 @@
                                    (dissoc :shell/loaded-screens)
                                    (assoc :view-id (or @shell.state/selected-stack-id :shell)))
     :effects.shell/pop-to-root nil}
-   (when (:current-chat-id db)
-     {:dispatch-n [[:chat/close]]})))
+   #_(when (:current-chat-id db)
+       {:dispatch-n [[:chat/close]]})))
 
 (rf/defn init-root
   {:events [:init-root]}

@qoqobolo
Copy link
Contributor Author

qoqobolo commented Dec 7, 2023

@ilmotta thanks for finding the cause of the issue, @Parveshdhull thanks for taking it!

@Parveshdhull
Copy link
Member

Parveshdhull commented Dec 7, 2023

Thank you @qoqobolo for finding this issue. And @ilmotta for pinging me.
Looks like there are two issues here

  1. We are closing all screens(pop-to-root) when navigating to different channels, even the background community screen. I don't think we should do that.
  2. We are closing the previous chat while popping root, but it is too late and causes us to close the current chat.

should be fixed in #18111

@ilmotta ilmotta removed the bug label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants