diff --git a/v1/selection.go b/v1/selection.go index 6c6844c..5d92a15 100644 --- a/v1/selection.go +++ b/v1/selection.go @@ -91,6 +91,14 @@ func createSelection(cursorPos int) Selection { lessons = append(lessons, lesson) content.Rows = append(content.Rows, lesson.Title) + lesson = Lesson{ + Title: "Random Prose", + Content: "", + Tag: PROSE_MODE, + } + lessons = append(lessons, lesson) + content.Rows = append(content.Rows, lesson.Title) + // Load lessons from directory files, err := ioutil.ReadDir(home + LessonsDir) if err != nil { @@ -110,6 +118,8 @@ func createSelection(cursorPos int) Selection { content.Rows = append(content.Rows, lesson.Title) } + lessons[1].Content = lessons[rand.Intn(len(lessons) - 2) + 2].Content + content.SetRect(MainMinX, MainMinY, MainMaxX, MainMaxY) content.SelectedRowStyle = ui.NewStyle(ui.ColorGreen) content.SelectedRow = cursorPos