Search in sources :

Example 1 with HomeFragment

use of dev.dworks.apps.anexplorer.fragment.HomeFragment in project AnExplorer by 1hakr.

the class DocumentsActivity method again.

@Override
public void again() {
    if (Utils.hasMarshmallow()) {
        RootsCache.updateRoots(this, ExternalStorageProvider.AUTHORITY);
        mRoots = DocumentsApplication.getRootsCache(this);
        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {

            @Override
            public void run() {
                mRoots.updateAsync();
                final RootInfo root = getCurrentRoot();
                if (root.isHome()) {
                    HomeFragment homeFragment = HomeFragment.get(getFragmentManager());
                    if (null != homeFragment) {
                        homeFragment.reloadData();
                    }
                }
            }
        }, 500);
    }
}
Also used : RootInfo(dev.dworks.apps.anexplorer.model.RootInfo) Handler(android.os.Handler) HomeFragment(dev.dworks.apps.anexplorer.fragment.HomeFragment)

Aggregations

Handler (android.os.Handler)1 HomeFragment (dev.dworks.apps.anexplorer.fragment.HomeFragment)1 RootInfo (dev.dworks.apps.anexplorer.model.RootInfo)1