mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3423 Settings | Enhancement | Show ethereumKey in tech info section on About screen (#2256)
This commit is contained in:
parent
43191fe442
commit
db4ec70790
7 changed files with 25 additions and 10 deletions
|
@ -58,6 +58,7 @@ class AboutAppFragment : BaseBottomSheetComposeFragment() {
|
|||
libraryVersion = vm.libraryVersion.collectAsState().value,
|
||||
accountId = vm.accountId.collectAsState().value,
|
||||
analyticsId = vm.analyticsId.collectAsState().value,
|
||||
ethereumKey = vm.ethereumAddress.collectAsState().value,
|
||||
deviceId = vm.deviceId.collectAsState().value,
|
||||
onMetaClicked = { copyMetaToClipboard() },
|
||||
onContactUsClicked = {
|
||||
|
@ -72,6 +73,7 @@ class AboutAppFragment : BaseBottomSheetComposeFragment() {
|
|||
os = getOsVersion(),
|
||||
device = getDevice(),
|
||||
deviceId = vm.deviceId.value,
|
||||
ethereumKey = vm.ethereumAddress.value
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -132,7 +134,7 @@ class AboutAppFragment : BaseBottomSheetComposeFragment() {
|
|||
ClipData.newPlainText(
|
||||
"Your Anytype technical info",
|
||||
getString(
|
||||
R.string.about_meta_info_for_copy,
|
||||
R.string.about_meta_info_for_copy_new,
|
||||
getDeviceName(),
|
||||
Build.VERSION.SDK_INT,
|
||||
getVersionText(),
|
||||
|
@ -140,7 +142,8 @@ class AboutAppFragment : BaseBottomSheetComposeFragment() {
|
|||
vm.libraryVersion.value,
|
||||
vm.accountId.value,
|
||||
vm.deviceId.value,
|
||||
vm.analyticsId.value
|
||||
vm.analyticsId.value,
|
||||
vm.ethereumAddress.value
|
||||
)
|
||||
)
|
||||
clipboard.setPrimaryClip(clip)
|
||||
|
@ -174,7 +177,8 @@ class AboutAppFragment : BaseBottomSheetComposeFragment() {
|
|||
library: String,
|
||||
analytics: Id,
|
||||
deviceId: Id,
|
||||
os: String
|
||||
os: String,
|
||||
ethereumKey: String
|
||||
) : String {
|
||||
return "support@anytype.io" +
|
||||
"?subject=Support%20request%2C%20Account%20ID%20$account" +
|
||||
|
@ -185,7 +189,8 @@ class AboutAppFragment : BaseBottomSheetComposeFragment() {
|
|||
"%0D%0ALibrary%20version%3A%20$library" +
|
||||
"%0D%0AAccount%20ID%3A%20$account" +
|
||||
"%0D%0ADevice%20ID%3A%20$deviceId" +
|
||||
"%0D%0AAnalytics%20ID%3A%20$analytics"
|
||||
"%0D%0AAnalytics%20ID%3A%20$analytics" +
|
||||
"%0D%0AEthereum%20key%3A%20$ethereumKey"
|
||||
}
|
||||
|
||||
override fun injectDependencies() {
|
||||
|
|
|
@ -19,5 +19,6 @@ data class Config(
|
|||
val analytics: Id,
|
||||
val device: Id,
|
||||
val network: Id,
|
||||
val workspaceObjectId: Id
|
||||
val workspaceObjectId: Id,
|
||||
val ethereumAddress: String = ""
|
||||
)
|
|
@ -33,6 +33,7 @@ fun AboutAppScreen(
|
|||
deviceId: String,
|
||||
version: String,
|
||||
buildNumber: Int,
|
||||
ethereumKey: String,
|
||||
onMetaClicked: () -> Unit,
|
||||
onContactUsClicked: () -> Unit,
|
||||
onExternalLinkClicked: (AboutAppViewModel.ExternalLink) -> Unit,
|
||||
|
@ -108,13 +109,14 @@ fun AboutAppScreen(
|
|||
) {
|
||||
Text(
|
||||
text = stringResource(
|
||||
id = R.string.about_meta_info,
|
||||
id = R.string.about_meta_info_new,
|
||||
version,
|
||||
buildNumber,
|
||||
libraryVersion,
|
||||
accountId,
|
||||
deviceId,
|
||||
analyticsId
|
||||
analyticsId,
|
||||
ethereumKey
|
||||
),
|
||||
style = Caption2Regular.copy(
|
||||
color = colorResource(id = R.color.text_secondary)
|
||||
|
@ -173,6 +175,7 @@ fun PreviewAboutAppScreen() {
|
|||
buildNumber = 1,
|
||||
onMetaClicked = {},
|
||||
onExternalLinkClicked = {},
|
||||
onContactUsClicked = {}
|
||||
onContactUsClicked = {},
|
||||
ethereumKey = "Some key"
|
||||
)
|
||||
}
|
|
@ -50,6 +50,7 @@ class AboutAppViewModel(
|
|||
val accountId = MutableStateFlow("")
|
||||
val analyticsId = MutableStateFlow("")
|
||||
val deviceId = MutableStateFlow("")
|
||||
val ethereumAddress = MutableStateFlow("")
|
||||
|
||||
init {
|
||||
viewModelScope.launch {
|
||||
|
@ -64,6 +65,7 @@ class AboutAppViewModel(
|
|||
val config = configStorage.get()
|
||||
analyticsId.value = config.analytics
|
||||
deviceId.value = config.device
|
||||
ethereumAddress.value = config.ethereumAddress
|
||||
}
|
||||
viewModelScope.launch {
|
||||
getLibraryVersion(BaseUseCase.None).process(
|
||||
|
|
|
@ -55,7 +55,9 @@
|
|||
<string name="about_privacy_policy_link" translatable="false">https://anytype.io/privacy_policy.html</string>
|
||||
|
||||
<string name="about_meta_info">App version: %1$s\nBuild number: %2$d\nLibrary version: %3$s\nAccount\u00A0ID:\u00A0%4$s\nDevice\u00A0ID:\u00A0%5$s\nAnalytics\u00A0ID:\u00A0%6$s</string>
|
||||
<string name="about_meta_info_new">App version: %1$s\nBuild number: %2$d\nLibrary version: %3$s\nAccount\u00A0ID:\u00A0%4$s\nDevice\u00A0ID:\u00A0%5$s\nAnalytics\u00A0ID:\u00A0%6$s\nEthereum key\u00A0ID:\u00A0%7$s</string>
|
||||
<string name="about_meta_info_for_copy">Device: %1$s\nAndroid version: %2$d\nApp version: %3$s\nBuild number: %4$d\nLibrary version: %5$s\nAccount\u00A0ID:\u00A0%6$s\nDevice\u00A0ID:\u00A0%7$s\nAnalytics\u00A0ID:\u00A0%8$s</string>
|
||||
<string name="about_meta_info_for_copy_new">Device: %1$s\nAndroid version: %2$d\nApp version: %3$s\nBuild number: %4$d\nLibrary version: %5$s\nAccount\u00A0ID:\u00A0%6$s\nDevice\u00A0ID:\u00A0%7$s\nAnalytics\u00A0ID:\u00A0%8$s\nEthereum key\u00A0ID:\u00A0%9$s</string>
|
||||
<string name="space">Space</string>
|
||||
<string name="space_name">Space name</string>
|
||||
<string name="default_space">Entry space</string>
|
||||
|
|
|
@ -46,7 +46,8 @@ fun Rpc.Account.Select.Response.toAccountSetup(): AccountSetup {
|
|||
device = info.deviceId,
|
||||
network = info.networkId,
|
||||
techSpace = info.techSpaceId,
|
||||
workspaceObjectId = info.workspaceObjectId
|
||||
workspaceObjectId = info.workspaceObjectId,
|
||||
ethereumAddress = info.ethereumAddress
|
||||
),
|
||||
status = status?.core() ?: AccountStatus.Unknown
|
||||
)
|
||||
|
|
|
@ -841,7 +841,8 @@ fun Account.Info.config(): Config = Config(
|
|||
analytics = analyticsId,
|
||||
device = deviceId,
|
||||
network = networkId,
|
||||
workspaceObjectId = workspaceObjectId
|
||||
workspaceObjectId = workspaceObjectId,
|
||||
ethereumAddress = ethereumAddress
|
||||
)
|
||||
|
||||
fun MManifestInfo.toCoreModel(): ManifestInfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue