update the operation button's show/hide logic