Refactor: cache IsReadAndConfirm() result in variable

Store envelope.IsReadAndConfirm() in isReadAndConfirm variable to avoid redundant calls and improve code readability when setting ViewData["Title"]. No change to logic or behavior.
This commit is contained in:
2026-03-06 09:50:33 +01:00
parent 44edef8ba1
commit b64d2b7478

View File

@@ -25,9 +25,11 @@
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
isReadOnly = isReadOnly_bool;
var isReadAndConfirm = envelope.IsReadAndConfirm();
ViewData["Title"] = isReadOnly
? _localizer.ViewDoc()
: envelope.IsReadAndConfirm()
: isReadAndConfirm
? _localizer.ConfirmDoc()
: _localizer.SignDoc();
}