mirror of
https://github.com/1SecondEveryday/MemoryTree.git
synced 2026-03-25 08:55:47 +00:00
Even more cloudier
This commit is contained in:
parent
db7cd43658
commit
c9ac47470f
1 changed files with 9 additions and 7 deletions
|
|
@ -25,14 +25,16 @@ struct CloudView: View {
|
|||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
ForEach(words, id: \.self) { word in
|
||||
let count = countedWords[word, default: 1]
|
||||
Text(word)
|
||||
.font(fontForCount(count))
|
||||
.bold(count > 2)
|
||||
}
|
||||
var isFirst = true
|
||||
words.reduce(Text("")) { cloud, word in
|
||||
defer { isFirst = false }
|
||||
let count = countedWords[word, default: 1]
|
||||
let bullet = (isFirst ? Text("") : Text(" • "))
|
||||
return cloud + bullet + Text(word)
|
||||
.font(fontForCount(count))
|
||||
.bold(count > 2)
|
||||
}
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.background(Color.blue)
|
||||
|
|
|
|||
Loading…
Reference in a new issue