It might also be better to assign the inline if to a variable at the start of the callback and reuse it in the 4 formats, to reduce the line width.