Skip to content

Commit

Permalink
Show app name at the top in the incoming request screen
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Nov 20, 2024
1 parent 167ccd8 commit e50e65d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/src/main/java/com/greenart7c3/nostrsigner/ui/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,19 @@ fun MainScreen(
}
}
} else {
title = routes.find { it.route == destinationRoute }?.title ?: ""
launch(Dispatchers.IO) {
if (destinationRoute == Route.IncomingRequest.route && intents.isNotEmpty()) {
val application = database.applicationDao().getByKey(intents.first().bunkerRequest?.localKey ?: packageName ?: "")?.application
val titleTemp = application?.name?.ifBlank { application.key.toShortenHex() } ?: packageName ?: ""
title = if (titleTemp.isBlank()) {
routes.find { it.route == destinationRoute }?.title ?: ""
} else {
"$titleTemp - Request"
}
} else {
title = routes.find { it.route == destinationRoute }?.title ?: ""
}
}
}
}

Expand Down

0 comments on commit e50e65d

Please sign in to comment.