Commit e9d1393e authored by Winnie Hellmann's avatar Winnie Hellmann

Rename initialDiscussion to firstNote in NoteableDiscussion

parent a89df585
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
'showJumpToNextDiscussion', 'showJumpToNextDiscussion',
]), ]),
author() { author() {
return this.initialDiscussion.author; return this.firstNote.author;
}, },
canReply() { canReply() {
return this.getNoteableData.current_user.can_create_note; return this.getNoteableData.current_user.can_create_note;
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
hasReplies() { hasReplies() {
return this.discussion.notes.length > 1; return this.discussion.notes.length > 1;
}, },
initialDiscussion() { firstNote() {
return this.discussion.notes.slice(0, 1)[0]; return this.discussion.notes.slice(0, 1)[0];
}, },
replies() { replies() {
...@@ -247,7 +247,7 @@ export default { ...@@ -247,7 +247,7 @@ export default {
if (this.isReplying) { if (this.isReplying) {
this.$nextTick(() => { this.$nextTick(() => {
// Pass an extra key to separate reply and note edit forms // Pass an extra key to separate reply and note edit forms
this.initAutoSave({ ...this.initialDiscussion, ...this.discussion }, ['Reply']); this.initAutoSave({ ...this.firstNote, ...this.discussion }, ['Reply']);
}); });
} else { } else {
this.disposeAutoSave(); this.disposeAutoSave();
...@@ -390,8 +390,8 @@ Please check your network connection and try again.`; ...@@ -390,8 +390,8 @@ Please check your network connection and try again.`;
<div class="timeline-content"> <div class="timeline-content">
<note-header <note-header
:author="author" :author="author"
:created-at="initialDiscussion.created_at" :created-at="firstNote.created_at"
:note-id="initialDiscussion.id" :note-id="firstNote.id"
:include-toggle="true" :include-toggle="true"
:expanded="discussion.expanded" :expanded="discussion.expanded"
@toggleHandler="toggleDiscussionHandler" @toggleHandler="toggleDiscussionHandler"
...@@ -424,8 +424,8 @@ Please check your network connection and try again.`; ...@@ -424,8 +424,8 @@ Please check your network connection and try again.`;
<ul class="notes"> <ul class="notes">
<template v-if="shouldGroupReplies"> <template v-if="shouldGroupReplies">
<component <component
:is="componentName(initialDiscussion)" :is="componentName(firstNote)"
:note="componentData(initialDiscussion)" :note="componentData(firstNote)"
:line="line" :line="line"
:commit="commit" :commit="commit"
:help-page-path="helpPagePath" :help-page-path="helpPagePath"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment