Refresh tabs page

In my tabs page I have 4 icons, one of this is messages icon. I’d like to refresh tabs page to change message icon from “mail-outline” to “mail-outline-unread” if the are new messages. I created a function “newMessages()” which returns unread message numbers, but after loading on app opening, how can I reload this function in tabs page each 1 minute, or when I switch from a tab to another?