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

Refactor narrow patterns (use stream ID) #3230

Closed
jainkuniya opened this issue Dec 20, 2018 · 4 comments
Closed

Refactor narrow patterns (use stream ID) #3230

jainkuniya opened this issue Dec 20, 2018 · 4 comments

Comments

@jainkuniya
Copy link
Member

Currently for stream narrow, narrow object is like:

{
operand: "NLP"
operator: "stream"
}

Now the problem is:
What if user is in such narrow and stream name changes? Our getIsActiveStreamSubscribed will start returning false. As we are comparing names

subscriptions.find(sub => narrow[0].operand === sub.name)

How to reproduce:

  • Narrow to any stream.
  • Change it's name, via Clicking on info button in nav bar in chatScreen.
  • Now navigate back to chat screen after changing name.

Observation:

  • "Not subscribed" message is displayed instead of ComposeBox.
  • NavBar is gray.

Same goes for PM narrow, on changing email.

@gnprice @borisyankov
What should be the priority of this issue?

@zulipbot claim

@borisyankov
Copy link
Contributor

This is not the only issue. We will be trying to fetch more messages for a non-existing narrow too.

@borisyankov
Copy link
Contributor

I think the title of this issue is quite generic and misleading, rename to something that better reflects the problem.

@borisyankov
Copy link
Contributor

ChatScreen needs to have its params.narrow changed.
What we need to do:

if (stream renamed && we are narrowed to it) {
  goBack();
  doNarrow(newStringNarrow);
}

That will be a bit disruptive UI-wise though, but that is fine for a rare occurrence.

@gnprice
Copy link
Member

gnprice commented Dec 10, 2020

Tracking this now as part of #4333.

@gnprice gnprice closed this as completed Dec 10, 2020
@gnprice gnprice changed the title Refactor narrow patterns. Refactor narrow patterns (use stream ID) Dec 10, 2020
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

3 participants