From 589ee73bfd78818f46de505501c09b8e2db65994 Mon Sep 17 00:00:00 2001 From: maskers <97827489+maskersss@users.noreply.github.com> Date: Wed, 21 Aug 2024 19:42:35 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Alexandru Ionut Tripon Signed-off-by: maskers <97827489+maskersss@users.noreply.github.com> (cherry picked from commit 99bd4a89373416cea641f1421d1082ff823eba2e) --- launcher/ui/GuiUtil.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/launcher/ui/GuiUtil.cpp b/launcher/ui/GuiUtil.cpp index 3b0eccd02..de72a7d5d 100644 --- a/launcher/ui/GuiUtil.cpp +++ b/launcher/ui/GuiUtil.cpp @@ -115,17 +115,15 @@ std::optional GuiUtil::uploadPaste(const QString& name, const QString& QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ->exec(); - if (truncateResponse == QMessageBox::Yes) - shouldTruncate = true; + shouldTruncate = truncateResponse == QMessageBox::Yes; } } } - QString textToUpload; - if (shouldTruncate) + QString textToUpload = text; + if (shouldTruncate) { textToUpload = truncateLogForMclogs(text); - else - textToUpload = text; + } std::unique_ptr paste(new PasteUpload(parentWidget, textToUpload, pasteCustomAPIBaseSetting, pasteTypeSetting));