From 94b9fd79847e8ac1ea366e5804035953cebb3227 Mon Sep 17 00:00:00 2001 From: Philemon Ukane Date: Mon, 27 Nov 2023 16:10:40 +0100 Subject: [PATCH] review changes Signed-off-by: Philemon Ukane --- ui/page/dcrdex/market.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ui/page/dcrdex/market.go b/ui/page/dcrdex/market.go index e8c8402bf..b7c1b45d4 100644 --- a/ui/page/dcrdex/market.go +++ b/ui/page/dcrdex/market.go @@ -161,9 +161,11 @@ func (pg *DEXMarketPage) OnNavigatedTo() { }) } - // Include the "Add Server" button. + // Include the "Add Server" button as part of pg.serverSelector items. The + // pg.addServerBtn will should open a modal or page to add a new server to + // DEX when clicked. servers = append(servers, cryptomaterial.DropDownItem{ - DisplayFn: pg.addServerBtnDisplay, + DisplayFn: components.IconButton(pg.Theme.Icons.ContentAdd, values.String(values.StrAddServer), layout.Inset{}, pg.Theme, pg.addServerBtn), PreventSelection: true, }) @@ -289,12 +291,6 @@ func (pg *DEXMarketPage) Layout(gtx C) D { }) } -// addServerBtnDisplay returns a clickable button layout. The pg.addServerBtn -// will should open a modal or page to add a new server to DEX when clicked. -func (pg DEXMarketPage) addServerBtnDisplay(gtx C) D { - return components.IconButton(pg.Theme.Icons.ContentAdd, values.String(values.StrAddServer), layout.Inset{}, pg.Theme, pg.addServerBtn)(gtx) -} - func (pg *DEXMarketPage) serverAndCurrencySelection(gtx C) D { return cryptomaterial.LinearLayout{ Width: cryptomaterial.MatchParent,