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

Connect trusted node setup screen with settings menu #133

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open class MainPresenter(private val notificationServiceController: Notification
companion object {
// FIXME this will be erased eventually, for now you can turn on to see the notifications working
// it will push a notification every 60 sec
const val testNotifications = true
const val testNotifications = false
const val PUSH_DELAY = 60000L
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import network.bisq.mobile.domain.data.repository.SettingsRepository
import network.bisq.mobile.presentation.BasePresenter
import network.bisq.mobile.presentation.MainPresenter
import network.bisq.mobile.presentation.ui.components.molecules.settings.MenuItem
import network.bisq.mobile.presentation.ui.uicases.startup.TrustedNodeSetupScreen

/**
* SettingsPresenter with default implementation
Expand All @@ -29,7 +30,7 @@ open class SettingsPresenter(
}

protected open fun addCustomSettings(menuItems: MutableList<MenuItem>): List<MenuItem> {
menuItems.add(MenuItem.Leaf("Trusted Node", content = { TrustedNodeSettingsScreen() }))
menuItems.add(MenuItem.Leaf("Trusted Node", content = { TrustedNodeSetupScreen(false) }))
return menuItems.toList()
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ interface ITrustedNodeSetupPresenter: ViewPresenter {

@OptIn(ExperimentalResourceApi::class)
@Composable
fun TrustedNodeSetupScreen(
) {
fun TrustedNodeSetupScreen(isWorkflow: Boolean = true) {
val strings = LocalStrings.current
val presenter: ITrustedNodeSetupPresenter = koinInject()
val navController: NavHostController = presenter.getRootNavController()
Expand Down Expand Up @@ -151,9 +150,9 @@ fun TrustedNodeSetupScreen(

) {
BisqButton(
text = "Next",
text = if (isWorkflow) "Next" else "Save",
color = BisqTheme.colors.light1,
onClick = { presenter.navigateToNextScreen() },
onClick = { if (isWorkflow) presenter.navigateToNextScreen() else presenter.testConnection(true) },
padding = PaddingValues(horizontal = 32.dp, vertical = 12.dp),
)
}
Expand Down
Loading