remove useless struct
This commit is contained in:
@@ -10,16 +10,12 @@ public class ExpoSelectableTextModule: Module {
|
||||
Prop("segments") { (view: ExpoSelectableTextView, prop: String) in
|
||||
// Convert the JSON to segments
|
||||
if let data = prop.data(using: .utf8) {
|
||||
if let segments = try? JSONDecoder().decode(TextSegments.self, from: data) {
|
||||
view.segments = segments.segments
|
||||
if let segments = try? JSONDecoder().decode([TextSegment].self, from: data) {
|
||||
view.segments = segments
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Prop("selectable") { (view: ExpoSelectableTextView, prop: Bool) in
|
||||
view.textView.isSelectable = prop
|
||||
}
|
||||
|
||||
Prop("rootStyle") { (view: ExpoSelectableTextView, prop: String) in
|
||||
if let data = prop.data(using: .utf8) {
|
||||
if let style = try? JSONDecoder().decode(TextStyle.self, from: data) {
|
||||
@@ -27,6 +23,10 @@ public class ExpoSelectableTextModule: Module {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Prop("selectable") { (view: ExpoSelectableTextView, prop: Bool) in
|
||||
view.textView.isSelectable = prop
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user