Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deep link URL parsing #30

Merged
merged 10 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "com.spruceid.mobilesdkexample"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 3
versionName = "1.0.0+3"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AchievementCredentialItem {

@Composable
fun listComponent() {
val achievementName = keyPathFinder(credential, mutableListOf("achievement", "name")).toString()
val achievementName = keyPathFinder(credential, mutableListOf("name")).toString()
val issuerName = keyPathFinder(credential, mutableListOf("issuer", "name")).toString()

Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import com.spruceid.mobilesdkexample.db.RawCredentials
import com.spruceid.mobilesdkexample.navigation.Screen
import com.spruceid.mobilesdkexample.ui.theme.CTAButtonGreen
import com.spruceid.mobilesdkexample.ui.theme.Inter
import com.spruceid.mobilesdkexample.ui.theme.MobileSdkTheme
Expand Down Expand Up @@ -75,7 +76,10 @@ fun AddToWalletView(
rawCredentialsViewModel.saveRawCredential(RawCredentials(
rawCredential = rawCredential
))
navController.popBackStack()

navController.navigate(Screen.HomeScreen.route) {
popUpTo(0)
}
}
},
shape = RoundedCornerShape(5.dp),
Expand Down Expand Up @@ -119,7 +123,7 @@ fun AddToWalletView(
@Preview(showBackground = true)
@Composable
fun AddToWalletPreview() {
var navController: NavHostController = rememberNavController()
val navController: NavHostController = rememberNavController()

MobileSdkTheme {
AddToWalletView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ fun WalletHomeBody(rawCredentialsViewModel: IRawCredentialsViewModel) {
items(rawCredentials) { rawCredential ->
AchievementCredentialItem(rawCredential.rawCredential).component()
}
item {
vcs.map { vc ->
GenericCredentialListItems(vc = vc)
}
ShareableCredentialListItems(mdocBase64 = mdocBase64)
}
// item {
// vcs.map { vc ->
// GenericCredentialListItems(vc = vc)
// }
// ShareableCredentialListItems(mdocBase64 = mdocBase64)
// }
}
}
Loading