diff options
author | Dessalines <tyhou13@gmx.com> | 2020-03-03 11:07:07 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-03-03 11:07:07 -0500 |
commit | 48594537c038e7c57e232d8de0daa25c7007d44c (patch) | |
tree | 671a16811e465132a09d4c89e1b31bcc715bf67d /ui/src/components/post-listing.tsx | |
parent | b3b4b7977570edda224003efca5396c10363599d (diff) |
Change action sizes. Add better tippy updating.
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r-- | ui/src/components/post-listing.tsx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 6e285ee9..97d319d8 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -102,8 +102,17 @@ export class PostListing extends Component<PostListingProps, PostListingState> { } } - componentDidUpdate() { - setupTippy(); + componentDidUpdate(prevProps: PostListingProps) { + let prevPost = prevProps.post; + let post = this.props.post; + if ( + prevPost.saved !== post.saved || + prevPost.deleted !== post.deleted || + prevPost.locked !== post.locked || + prevPost.stickied !== post.stickied + ) { + setupTippy(); + } } componentWillReceiveProps(nextProps: PostListingProps) { @@ -492,7 +501,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> { </> )} </ul> - <ul class="list-inline mb-1 text-muted h6 font-weight-bold"> + <ul class="list-inline mb-1 text-muted h5 font-weight-bold"> {UserService.Instance.user && ( <> {this.props.showBody && ( @@ -1305,5 +1314,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> { handleShowAdvanced(i: PostListing) { i.state.showAdvanced = !i.state.showAdvanced; i.setState(i.state); + setupTippy(); } } |