Closed jhennyferOliveira closed 4 years ago
eu coloquei um função dentro do menu do diario. showAnotation(), nela eu coloquei um espaço pra chamar algo para o submenu selecionar a anotação
pro usuário ver a anotação, selecionar e ver o texto de fato.
func showAnotations() {
let service = Service<Anotation>()
let diary = service.read(filePath: completePathDiary)
let anotations = diario.enumerated().map { (index, anotation) in
return "\(index) - \(anotation.titulo)" // array: String = ["0 - teste". "1 - teste" ," 2 - teste"]
}.reduce(""){ $0 + "\n" + $1 } // junta elementos do array -> 0 - teste \n 1 - teste
print("""
Anotações:
\(anotations)
Obs: para visualizar a anotação, basta escrever o indice ou nome da anotação.
""")
/* not implemented yet [submenu select anotation]
let screen_select_anotation = ScreenSelectAnotation()
screen_select_anotation.main()
*/
}
[x] Pesquisar por nome, data, categoria
[x] Submenu para selecionar anotação