Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Adds an arrow in front of a expandable stream to expand and contract … #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abhaymaniyar
Copy link
Collaborator

@abhaymaniyar abhaymaniyar commented Mar 15, 2017

…that stream.

Summary of changes
When a user clicked on a stream in the stream pane, it narrows down the stream. Now if a user clicks on the stream it expands the stream and shows the topics that the stream contains.
Screenshots or a brief video showing the change in action:

ezgif com-optimize 3

Please make sure these boxes are checked before submitting your pull request - thanks! Guide

  • Code is formatted.

  • Run the lint tests with ./gradlew lintDebug and make sure BUILD is SUCCESSFUL

  • If new feature is implemeted then it is compatible with Night theme too.

  • Commit messages are well-written.

@smarx
Copy link

smarx commented Mar 15, 2017

Automated message from Dropbox CLA bot

@abhaymaniyar, it looks like you've already signed the Dropbox CLA. Thanks!

@abhaymaniyar
Copy link
Collaborator Author

@Sam1301 Please review and help me to resolve merge conflicts.

Copy link
Collaborator

@saketkumar saketkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @abhaymaniyar I have left some comments.

<!--android:textSize="14sp"-->
<!--android:textStyle="bold" />-->
<!--</LinearLayout>-->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comments if there are not being used anywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saketkumar95! :)

@@ -30,7 +30,7 @@ public StreamSpan(String streamId, int color) {
@Override
public void onClick(View widget) {
Context context = widget.getContext().getApplicationContext();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra newline, remove this too. :)

@abhaymaniyar
Copy link
Collaborator Author

Thank you @saketkumar95 :). Can you please help me with the conflicts here?

Copy link
Collaborator

@kunall17 kunall17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhaymaniyar So this has one problem currently in ExpandableStreamDrawerAdapter.java we are getting the child's of the streamsDrawer from the current message cache in the DB, hence it's highly possible that we have no topics for that stream, and still the arrow indicator shows up,
Hence it would be better to not show the arrowHead for the streams which we don't have any topics!

@abhaymaniyar
Copy link
Collaborator Author

abhaymaniyar commented Mar 22, 2017

Thanks for reviewing @kunall17! Is there any variable in the code base which stores the number of topics in a stream?

@abhaymaniyar
Copy link
Collaborator Author

@kunall17 I am trying to implement what you said but there is a problem. I get the number of subjects in a stream only when I click on the stream. How can I get the number of subjects in a stream on launch of MainActivity?

@kunall17
Copy link
Collaborator

Yeah, true it only get's calculated when the expansion of the expandableListItem is done, so should we have arrow in all?
Maybe show a message, no topics found?

@abhaymaniyar
Copy link
Collaborator Author

Great! I can do that.

@zulipbot
Copy link
Member

zulipbot commented May 4, 2017

@abhaymaniyar, your pull request has developed a merge conflict! Please review the most recent commit (f791888) for conflicting changes and resolve your pull request's merge conflicts.

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

Successfully merging this pull request may close these issues.

6 participants