remove last posted non replied discussions
fixes COMMS-1457 Test Plan: -Create a course -Add a discussion -On the discussions index page, see that a "Last Post" time does not appear - add some replies - notice the last post time appears Change-Id: Ide93d613ab6a7c93936c59b42837845c7a6384d9 Reviewed-on: https://gerrit.instructure.com/165538 Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com> Tested-by: Jenkins QA-Review: Landon Gilbert-Bland <lbland@instructure.com> Product-Review: Steven Burnett <sburnett@instructure.com>
This commit is contained in:
parent
2421baf008
commit
fe90328f24
|
@ -236,7 +236,7 @@ export class DiscussionRow extends Component {
|
|||
: ' '
|
||||
result += dueDateString
|
||||
const lastReplyAtDate = $.datetimeString(this.props.discussion.last_reply_at)
|
||||
if (lastReplyAtDate.length > 0) {
|
||||
if (lastReplyAtDate.length > 0 && this.props.discussion.discussion_subentry_count > 0) {
|
||||
result += I18n.t('Last post at %{date}', {date: lastReplyAtDate})
|
||||
}
|
||||
return result
|
||||
|
@ -595,7 +595,7 @@ export class DiscussionRow extends Component {
|
|||
|
||||
renderLastReplyAt = () => {
|
||||
const datetimeString = $.datetimeString(this.props.discussion.last_reply_at)
|
||||
if (!datetimeString.length) {
|
||||
if (!datetimeString.length || this.props.discussion.discussion_subentry_count === 0) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue