Skip to content

Commit

Permalink
Merge pull request #1283 from wordpress-mobile/hotfix/v1.10.2
Browse files Browse the repository at this point in the history
Hotfix v1.10.2 -> Master
  • Loading branch information
etoledom authored Aug 12, 2019
2 parents fd49029 + dfddd25 commit d9b38f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg-mobile",
"version": "1.10.1",
"version": "1.10.2",
"private": true,
"config": {
"jsfiles": "./*.js src/*.js src/**/*.js src/**/**/*.js",
Expand Down
15 changes: 13 additions & 2 deletions react-native-gutenberg-bridge/ios/Gutenberg.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,12 @@ public class Gutenberg: NSObject {
bridgeModule.sendEventIfNeeded(name: EventName.mediaUpload, body: data)
}

public func appendMedia(id: Int32, url: URL) {
let data: [String: Any] = ["mediaId": id, "mediaUrl": url.absoluteString];
public func appendMedia(id: Int32, url: URL, type: MediaType) {
let data: [String: Any] = [
"mediaId" : id,
"mediaUrl" : url.absoluteString,
"mediaType": type.rawValue,
]
bridgeModule.sendEventIfNeeded(name: EventName.mediaAppend, body: data)
}

Expand Down Expand Up @@ -153,3 +157,10 @@ extension Gutenberg {
}

}

extension Gutenberg {
public enum MediaType: String {
case image
case video
}
}

0 comments on commit d9b38f4

Please sign in to comment.