addExtraActions() will already add a separator before the cancel action or the extra actions so we do not need to add one in fillPopupMenu. Also if the first action of the extra actions is a separator we do not need to add an additional one.
Before:
After: