Skip to content

Commit 54274fb

Browse files
committed
Rename MediaInsertion class to MediaInserter
1 parent bd064ff commit 54274fb

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

Example/AztecExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
FF629DC9223BC418004C4106 /* videoShortcodes.html in Resources */ = {isa = PBXBuildFile; fileRef = FF629DC8223BC418004C4106 /* videoShortcodes.html */; };
4444
FF9AF5481DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FF9AF5471DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard */; };
4545
FFC41BDE20DBC7BA004DFB4D /* video.html in Resources */ = {isa = PBXBuildFile; fileRef = FFC41BDD20DBC7BA004DFB4D /* video.html */; };
46-
FFFA53D023C4A64200829A43 /* MediaInsertionHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFFA53CF23C4A64200829A43 /* MediaInsertionHelper.swift */; };
46+
FFFA53D023C4A64200829A43 /* MediaInserter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFFA53CF23C4A64200829A43 /* MediaInserter.swift */; };
4747
FFFA53D523C4AD0B00829A43 /* TextViewAttachmentDelegateProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFFA53D423C4AD0B00829A43 /* TextViewAttachmentDelegateProvider.swift */; };
4848
FFFA53D723C4C43700829A43 /* UIImage+SaveTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFFA53D623C4C43700829A43 /* UIImage+SaveTo.swift */; };
4949
/* End PBXBuildFile section */
@@ -163,7 +163,7 @@
163163
FF629DC8223BC418004C4106 /* videoShortcodes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = videoShortcodes.html; sourceTree = "<group>"; };
164164
FF9AF5471DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = AttachmentDetailsViewController.storyboard; sourceTree = "<group>"; };
165165
FFC41BDD20DBC7BA004DFB4D /* video.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = video.html; sourceTree = "<group>"; };
166-
FFFA53CF23C4A64200829A43 /* MediaInsertionHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaInsertionHelper.swift; sourceTree = "<group>"; };
166+
FFFA53CF23C4A64200829A43 /* MediaInserter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaInserter.swift; sourceTree = "<group>"; };
167167
FFFA53D423C4AD0B00829A43 /* TextViewAttachmentDelegateProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewAttachmentDelegateProvider.swift; sourceTree = "<group>"; };
168168
FFFA53D623C4C43700829A43 /* UIImage+SaveTo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+SaveTo.swift"; sourceTree = "<group>"; };
169169
/* End PBXFileReference section */
@@ -262,7 +262,7 @@
262262
607FACD71AFB9204008FA782 /* ViewController.swift */,
263263
E63EF92A1D36A60B00B5BA4B /* EditorDemoController.swift */,
264264
FFFA53D423C4AD0B00829A43 /* TextViewAttachmentDelegateProvider.swift */,
265-
FFFA53CF23C4A64200829A43 /* MediaInsertionHelper.swift */,
265+
FFFA53CF23C4A64200829A43 /* MediaInserter.swift */,
266266
FFFA53D623C4C43700829A43 /* UIImage+SaveTo.swift */,
267267
B5DB1C361EC630E10005E623 /* UnknownEditorViewController.swift */,
268268
607FACD91AFB9204008FA782 /* Main.storyboard */,
@@ -480,7 +480,7 @@
480480
isa = PBXSourcesBuildPhase;
481481
buildActionMask = 2147483647;
482482
files = (
483-
FFFA53D023C4A64200829A43 /* MediaInsertionHelper.swift in Sources */,
483+
FFFA53D023C4A64200829A43 /* MediaInserter.swift in Sources */,
484484
B5DB1C371EC630E10005E623 /* UnknownEditorViewController.swift in Sources */,
485485
FFFA53D523C4AD0B00829A43 /* TextViewAttachmentDelegateProvider.swift in Sources */,
486486
599F25701D8BCF57002871D6 /* AppDelegate.swift in Sources */,

Example/Example/EditorDemoController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class EditorDemoController: UIViewController {
2424
}
2525
}
2626

27-
fileprivate(set) lazy var mediaInsertionHelper: MediaInsertionHelper = {
28-
return MediaInsertionHelper(textView: self.richTextView, attachmentTextAttributes: Constants.mediaMessageAttributes)
27+
fileprivate(set) lazy var mediaInserter: MediaInserter = {
28+
return MediaInserter(textView: self.richTextView, attachmentTextAttributes: Constants.mediaMessageAttributes)
2929
}()
3030

3131
fileprivate(set) lazy var textViewAttachmentDelegate: TextViewAttachmentDelegate = {
@@ -1084,13 +1084,13 @@ let info = convertFromUIImagePickerControllerInfoKeyDictionary(info)
10841084
}
10851085

10861086
// Insert Image + Reclaim Focus
1087-
mediaInsertionHelper.insertImage(image)
1087+
mediaInserter.insertImage(image)
10881088

10891089
case typeMovie:
10901090
guard let videoURL = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.mediaURL)] as? URL else {
10911091
return
10921092
}
1093-
mediaInsertionHelper.insertVideo(videoURL)
1093+
mediaInserter.insertVideo(videoURL)
10941094
default:
10951095
print("Media type not supported: \(mediaType)")
10961096
}

Example/Example/MediaInsertionHelper.swift renamed to Example/Example/MediaInserter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Aztec
44
import AVFoundation
55
import Gridicons
66

7-
class MediaInsertionHelper
7+
class MediaInserter
88
{
99
fileprivate var mediaErrorMode = false
1010

@@ -36,7 +36,7 @@ class MediaInsertionHelper
3636
let progress = Progress(parent: nil, userInfo: [MediaProgressKey.mediaID: imageID])
3737
progress.totalUnitCount = 100
3838

39-
Timer.scheduledTimer(timeInterval: 0.1, target: self, selector: #selector(MediaInsertionHelper.timerFireMethod(_:)), userInfo: progress, repeats: true)
39+
Timer.scheduledTimer(timeInterval: 0.1, target: self, selector: #selector(MediaInserter.timerFireMethod(_:)), userInfo: progress, repeats: true)
4040
}
4141

4242
func insertVideo(_ videoURL: URL) {
@@ -53,7 +53,7 @@ class MediaInsertionHelper
5353
let progress = Progress(parent: nil, userInfo: [MediaProgressKey.mediaID: mediaID, MediaProgressKey.videoURL:videoURL])
5454
progress.totalUnitCount = 100
5555

56-
Timer.scheduledTimer(timeInterval: 0.1, target: self, selector: #selector(MediaInsertionHelper.timerFireMethod(_:)), userInfo: progress, repeats: true)
56+
Timer.scheduledTimer(timeInterval: 0.1, target: self, selector: #selector(MediaInserter.timerFireMethod(_:)), userInfo: progress, repeats: true)
5757
}
5858

5959
@objc func timerFireMethod(_ timer: Timer) {

0 commit comments

Comments
 (0)