-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Make public stream accessible for logged out users #7775
Conversation
@@ -17,5 +18,5 @@ | |||
.loader.hidden | |||
.spinner | |||
|
|||
- if current_user.contacts.size < 2 | |||
- if current_user && current_user.contacts.size < 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use safe navigation (&.
) instead of checking if an object exists before calling the method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While one could write this as current_user&.contacts&.size&.< 2
, I think it's much more readable the way it is now, so I think we can ignore this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already started working on this one over one and a half year ago, but had problems with what to do with the sidebar so I threw it away again and did other things. The solution with just removing the sidebar completely and center the stream actually looks quiet good 👍 (I have no idea why I didn't just do the same back then ;) )
@@ -17,5 +18,5 @@ | |||
.loader.hidden | |||
.spinner | |||
|
|||
- if current_user.contacts.size < 2 | |||
- if current_user && current_user.contacts.size < 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While one could write this as current_user&.contacts&.size&.< 2
, I think it's much more readable the way it is now, so I think we can ignore this one.
Merged as 01ae004, thanks! 🍪 |
Fixes #6564.