-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds the ability to hide comment "subtrees". Because of the way we parse, each comment is an indpendent entity with no parent-child relationship. However, we can use the comment order + indent level to determine if a comment is a child of some arbitrary parent comment. I setup a simple function to find all the children of a comment that would be hidden or displayed based on the selected parent. I also added a lil icon to show show if a comment is displayed or hidden. Last thing I snuck in here was getting the comment HTML rather than the escaped string, so that we can parse comments as HTML (render links, formatting, etc).
- Loading branch information
Showing
4 changed files
with
134 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M5.23,15.791C4.932,15.503 4.922,15.029 5.209,14.73L9.459,10.23C9.601,10.083 9.796,10 10,10C10.204,10 10.399,10.083 10.541,10.23L14.791,14.73C15.078,15.029 15.068,15.503 14.77,15.791C14.471,16.078 13.997,16.068 13.709,15.77L10,11.832L6.291,15.77C6.004,16.068 5.529,16.078 5.23,15.791ZM5.23,9.791C4.932,9.504 4.922,9.029 5.209,8.73L9.459,4.23C9.601,4.083 9.796,4 10,4C10.204,4 10.399,4.083 10.541,4.23L14.791,8.73C15.078,9.029 15.068,9.504 14.77,9.791C14.471,10.078 13.997,10.068 13.709,9.77L10,5.832L6.291,9.77C6.004,10.068 5.529,10.078 5.23,9.791Z" | ||
android:fillColor="#0F172A" | ||
android:fillType="evenOdd"/> | ||
</vector> |