[WIP] Make it work when hiding the send mail dialog

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>