Skip to content

Commit 8177578

Browse files
committed
qt: ensure seperator when adding third-party transaction links
This ensures that if we're going to add an action to open up a transaction in a third-party link (block explorer) that it is seperated into it's own section.
1 parent a70a980 commit 8177578

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/qt/transactionview.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,17 @@ void TransactionView::setModel(WalletModel *_model)
222222
{
223223
// Add third party transaction URLs to context menu
224224
QStringList listUrls = GUIUtil::SplitSkipEmptyParts(_model->getOptionsModel()->getThirdPartyTxUrls(), "|");
225+
bool actions_created = false;
225226
for (int i = 0; i < listUrls.size(); ++i)
226227
{
227228
QString url = listUrls[i].trimmed();
228229
QString host = QUrl(url, QUrl::StrictMode).host();
229230
if (!host.isEmpty())
230231
{
231-
if (i == 0)
232+
if (!actions_created) {
232233
contextMenu->addSeparator();
234+
actions_created = true;
235+
}
233236
/*: Transactions table context menu action to show the
234237
selected transaction in a third-party block explorer.
235238
%1 is a stand-in argument for the URL of the explorer. */

0 commit comments

Comments
 (0)