Skip to content

Commit

Permalink
Adding CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
theolm committed May 17, 2024
1 parent 11fabc1 commit d977d07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
7 changes: 2 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Changelog

## [v0.2.0] - 2024-04-22
## [v0.4.0] - 2024-05-17

### Added

- **Typesafe arguments**: The library now supports typesafe arguments for deep links, making it easier to work with deep link parameters. In order to use it the app/module needs to include kotlinx-serialization. To get the parameter value, you can use the `getArgument` method on the `DeepLink` object. The method will return the parameter value or null if the parameter is not present.
- **BuildUrl**: The library now supports building URLs adding Serializable arguments. This is very handy for internal navigation. Use the `Rinku.buildUrl` to generate the url and pass it as argument to `handleDeepLink`.
- **New handle method**: The user now can call `Rinku.handleDeepLink` using the applied filter and mapper. This is useful when the application needs to fire a url that came from a push notification or api call.
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ object Config {
// Libraries versions
const val artifactId = "rinku"
const val groupId = "dev.theolm"
const val libVersion = "0.3.0"
const val libVersion = "0.4.0"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package dev.theolm.rinku.compose.ext

import android.content.Intent
import androidx.activity.ComponentActivity
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.core.util.Consumer
import dev.theolm.rinku.Rinku
import dev.theolm.rinku.models.DeepLinkFilter
import dev.theolm.rinku.models.DeepLinkMapper
import dev.theolm.rinku.treatAndFireDeepLink
Expand All @@ -15,8 +17,8 @@ fun ComponentActivity.Rinku(
deepLinkMapper: DeepLinkMapper? = null,
content: @Composable () -> Unit
) {
deepLinkFilter?.let { dev.theolm.rinku.Rinku.setDeepLinkFilter(it) }
deepLinkMapper?.let { dev.theolm.rinku.Rinku.setDeepLinkMapper(it) }
deepLinkFilter?.let { Rinku.setDeepLinkFilter(it) }
deepLinkMapper?.let { Rinku.setDeepLinkMapper(it) }

intent.treatAndFireDeepLink(deepLinkFilter, deepLinkMapper)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ object Rinku {
fun buildUrl(url: String, vararg parameters: DeepLinkParam<*>) =
UrlBuilder.buildUrl(url, *parameters)

fun setDeepLinkFilter(deepLinkFilter: DeepLinkFilter) {
internal fun setDeepLinkFilter(deepLinkFilter: DeepLinkFilter) {
this.deepLinkFilter = deepLinkFilter
}

fun setDeepLinkMapper(deepLinkMapper: DeepLinkMapper) {
internal fun setDeepLinkMapper(deepLinkMapper: DeepLinkMapper) {
this.deepLinkMapper = deepLinkMapper
}
}
Expand Down

0 comments on commit d977d07

Please sign in to comment.