When selling investments on the secondary market, sellers of the investment will keep any income they have made up to the point of the sale. Once the sale has been transacted, the seller is removed from the register against those shares and stops accruing any benefit or interest. This means that they will not receive any payments once completed.
The next dividend date on the transacted shares will be unchanged and the payment will go to the owner of those shares on that dividend date.