Skip to content

Commit

Permalink
Fix deep link URL parsing (#30)
Browse files Browse the repository at this point in the history
* Update name and logo

* Update app name

* Fix credential display

* Remove unused imports
  • Loading branch information
Juliano1612 authored Sep 27, 2024
1 parent fd8bff6 commit 1834255
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
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)
// }
}
}

0 comments on commit 1834255

Please sign in to comment.