mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 16:31:00 +00:00
Include spoiler text count when applicable (#281)
This commit is contained in:
parent
29f6bf0579
commit
0ad5f17b5a
2 changed files with 5 additions and 1 deletions
|
@ -201,7 +201,7 @@ struct StatusEditorAccessoryView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private var characterCountView: some View {
|
private var characterCountView: some View {
|
||||||
Text("\((currentInstance.instance?.configuration?.statuses.maxCharacters ?? 500) - viewModel.statusText.string.utf16.count)")
|
Text("\((currentInstance.instance?.configuration?.statuses.maxCharacters ?? 500) - viewModel.statusText.string.utf16.count - viewModel.spoilerTextCount)")
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
.font(.scaledCallout)
|
.font(.scaledCallout)
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,10 @@ public class StatusEditorViewModel: ObservableObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var spoilerTextCount: Int {
|
||||||
|
spoilerOn ? spoilerText.utf16.count : 0
|
||||||
|
}
|
||||||
|
|
||||||
@Published var backupStatusText: NSAttributedString?
|
@Published var backupStatusText: NSAttributedString?
|
||||||
|
|
||||||
@Published var showPoll: Bool = false
|
@Published var showPoll: Bool = false
|
||||||
|
|
Loading…
Reference in a new issue