You are viewing a single comment's thread from:

RE: Write a Steemit Web App: Part 3 - Current Voting Power

in #steem-dev7 years ago

To make the refresh add this function to the end where refreshAccountData function was called:

        refreshAccountData(vm.user)
        function timeout() {
          refreshAccountData(vm.user,true)
          setTimeout(function () {
            timeout();
          }, 1000);
        }
        timeout()

No need to refresh follow(ers/ing) each time:

        function refreshAccountData(accountName,refresh=false) {
           ...
              if( ! refresh ) {
                getFollowersList()
                getFollowingList()
                getIgnoredList()
           ...
              }