Skip to content

Commit

Permalink
build(deps): bump Android SDK version from 2.3.14-fresco-v2.5.0 to 2.…
Browse files Browse the repository at this point in the history
…3.15-fresco-v2.5.0

feat(android): add trayHeightMultiplier support
  • Loading branch information
ALexanderLonsky committed Aug 8, 2024
1 parent e06573f commit e502281
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'com.giphy.sdk:ui:2.3.14-fresco-v2.5.0'
implementation 'com.giphy.sdk:ui:2.3.15-fresco-v2.5.0'
}

if (isNewArchitectureEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private enum class RTNDialogProps(val key: String) {
CLIPS_PREVIEW_RENDITION_TYPE("clipsPreviewRenditionType"),
CONFIRMATION_RENDITION_TYPE("confirmationRenditionType"),
ENABLE_DYNAMIC_TEXT("enableDynamicText"),
TRAY_HEIGHT_MULTIPLIER("trayHeightMultiplier"),
MEDIA_TYPE_CONFIG("mediaTypeConfig"),
RATING("rating"),
RENDITION_TYPE("renditionType"),
Expand Down Expand Up @@ -60,6 +61,12 @@ private fun giphyDialogSettingsFromRNValue(
)
}

if (options.hasKey(RTNDialogProps.TRAY_HEIGHT_MULTIPLIER.key)) {
settings.trayHeightMultiplier = options.getDouble(
RTNDialogProps.TRAY_HEIGHT_MULTIPLIER.key
).toFloat()
}

if (options.hasKey(RTNDialogProps.RATING.key)) {
val rawRating = options.getString(RTNDialogProps.RATING.key)
settings.rating = RTNGiphyRating.fromRNValue(rawRating) ?: RatingType.pg13
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Configure the `GiphyDialog` view and behavior.
| showSuggestionsBar | Show/hide a suggestions bar. | `boolean` | `true` |&nbsp;Android <br/> ❌&nbsp;iOS |
| stickerColumnCount | For carousel layouts, we provide the option to set the number of columns for stickers and text. We recommend using 3 columns for blurred mode. | [`GiphyStickersColumnCount`](../src/dto/misc.ts) | `.Three` |&nbsp;Android <br/> ✅&nbsp;iOS |
| theme | Adjust the GiphyDialog theme | [`GiphyTheme`](#giphytheme) | `.Light` |&nbsp;Android <br/> ✅&nbsp;iOS |
| trayHeightMultiplier | Height for the tray's "snap point" as a ratio of the GiphyDialog's height. | `number` | `0.7` | &nbsp;Android <br/> ✅&nbsp;iOS |
| trayHeightMultiplier | Height for the tray's "snap point" as a ratio of the GiphyDialog's height. | `number` | `0.7` | &nbsp;Android <br/> ✅&nbsp;iOS |

### </> show: `show() => void`

Expand Down

0 comments on commit e502281

Please sign in to comment.