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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user