Skip to content

Commit

Permalink
Move font step handling from context to coordinator
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Feb 14, 2024
1 parent 81e24c5 commit 5db6897
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Sources/RichTextKit/Context/RichTextContext+Actions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public extension RichTextContext {
/// Handle a certain rich text action.
func handle(_ action: RichTextAction) {
switch action {
case .stepFontSize(let points): fontSize += CGFloat(points)
case .toggleStyle(let style): toggle(style)
default: userActionPublisher.send(action)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ private extension RichTextCoordinator {
textView.highlightingStyle = style
case .setStyle(let style, let newValue):
setStyle(style, to: newValue)
case .stepFontSize:
break
case .stepFontSize(let points):
textView.stepRichTextFontSize(points: points)
case .stepIndent(let points):
textView.stepRichTextIndent(points: points)
case .stepSuperscript:
Expand Down

0 comments on commit 5db6897

Please sign in to comment.