mobile: show "transfer faster" and "switch address" without dev tools (#1440)

This commit is contained in:
Evgeny Poberezkin
2022-11-26 09:45:10 +00:00
committed by GitHub
parent 7a0d2add17
commit e5912e58f5
6 changed files with 12 additions and 24 deletions
@@ -157,10 +157,8 @@ fun ChatInfoLayout(
SectionSpacer()
SectionView(title = stringResource(R.string.conn_stats_section_title_servers)) {
if (developerTools) {
SwitchAddressButton(switchContactAddress)
SectionDivider()
}
SwitchAddressButton(switchContactAddress)
SectionDivider()
if (connStats != null) {
SectionItemView({
AlertManager.shared.showAlertMsg(
@@ -160,10 +160,8 @@ fun GroupMemberInfoLayout(
}
SectionSpacer()
SectionView(title = stringResource(R.string.conn_stats_section_title_servers)) {
if (developerTools) {
SwitchAddressButton(switchMemberAddress)
SectionDivider()
}
SwitchAddressButton(switchMemberAddress)
SectionDivider()
if (connStats != null) {
val rcvServers = connStats.rcvServers
val sndServers = connStats.sndServers
@@ -37,10 +37,8 @@ fun PrivacySettingsView(
SectionView(stringResource(R.string.settings_section_title_chats)) {
SettingsPreferenceItem(Icons.Outlined.Image, stringResource(R.string.auto_accept_images), chatModel.controller.appPrefs.privacyAcceptImages)
SectionDivider()
if (chatModel.controller.appPrefs.developerTools.get()) {
SettingsPreferenceItem(Icons.Outlined.ImageAspectRatio, stringResource(R.string.transfer_images_faster), chatModel.controller.appPrefs.privacyTransferImagesInline)
SectionDivider()
}
SettingsPreferenceItem(Icons.Outlined.ImageAspectRatio, stringResource(R.string.transfer_images_faster), chatModel.controller.appPrefs.privacyTransferImagesInline)
SectionDivider()
SettingsPreferenceItem(Icons.Outlined.TravelExplore, stringResource(R.string.send_link_previews), chatModel.controller.appPrefs.privacyLinkPreviews)
SectionDivider()
SectionItemView { SimpleXLinkOptions(chatModel.simplexLinkMode, onSelected = {
@@ -108,10 +108,8 @@ struct ChatInfoView: View {
.onTapGesture {
alert = .networkStatusAlert
}
if developerTools {
Button("Change receiving address") {
alert = .switchAddressAlert
}
Button("Change receiving address") {
alert = .switchAddressAlert
}
if let connStats = connectionStats {
smpServers("Receiving via", connStats.rcvServers)
@@ -70,10 +70,8 @@ struct GroupMemberInfoView: View {
Section("Servers") {
// TODO network connection status
if developerTools {
Button("Change receiving address") {
alert = .switchAddressAlert
}
Button("Change receiving address") {
alert = .switchAddressAlert
}
if let connStats = connectionStats {
smpServers("Receiving via", connStats.rcvServers)
@@ -34,10 +34,8 @@ struct PrivacySettings: View {
privacyAcceptImagesGroupDefault.set($0)
}
}
if developerTools {
settingsRow("photo.on.rectangle") {
Toggle("Transfer images faster", isOn: $transferImagesInline)
}
settingsRow("photo.on.rectangle") {
Toggle("Transfer images faster", isOn: $transferImagesInline)
}
settingsRow("network") {
Toggle("Send link previews", isOn: $useLinkPreviews)