Ion-refresher animation bug

Hey!
I just upgraded our app from beta 13 to rc.1 and it’s going really smooth, however, I noticed a bug on our ion-refresher.
Right after the spinner is done, the icon and pulling-text flashes for like 100 miliseconds, really annoying.
I’ve tried replacing the lib folder with a fresh download in case I messed something up in the scss files, but no luck

Here’s what it looks like:

image

HTML:

<ion-content class="has-bottom">
<ion-refresher pulling-text="Pull to refresh" on-refresh="doRefresh()">
</ion-refresher>

Controller:

$scope.doRefresh = function() {
    if ($networkinfo.online()) {
        $scope.networkstatus = true;
        $checkNetworkService.online()
            .then(function() {
                    // Some http calls                     
                },
                // Error
                function errorHandler() {
                    $scope.networkstatus = false;
                }
        );
    } else {
        $scope.networkstatus = false;
    }
    $scope.$broadcast('scroll.refreshComplete');
    $scope.$apply();
};

Anyone got a clue?

Thanks for your time and thank you Ionic for a wonderful framework!

2 Likes

Fixed it temporary by adding a timeout for refreshComplete,

        $timeout( function() {;

            $scope.$broadcast('scroll.refreshComplete');
            $scope.$apply();
                
        }, 100);
1 Like