Skip to content

Commit

Permalink
Connect trusted node setup screen with settings menu (#133)
Browse files Browse the repository at this point in the history
* - reusing bisq onboarding trusted node setup screen with minimal adaptations

* turn off notifications test code
  • Loading branch information
rodvar authored Dec 19, 2024
1 parent bea9064 commit 896d1c9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 30 deletions.
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

0 comments on commit 896d1c9

Please sign in to comment.