Search in sources :

Example 1 with MainActivity

use of com.nutomic.syncthingandroid.activities.MainActivity in project syncthing-android by syncthing.

the class DrawerFragment method updateGui.

/**
 * Invokes status callbacks.
 */
private void updateGui() {
    MainActivity mainActivity = (MainActivity) getActivity();
    if (mainActivity == null) {
        return;
    }
    if (mainActivity.isFinishing()) {
        return;
    }
    RestApi mApi = mainActivity.getApi();
    if (mApi != null) {
        mApi.getSystemInfo(this::onReceiveSystemInfo);
        mApi.getSystemVersion(this::onReceiveSystemVersion);
        mApi.getConnections(this::onReceiveConnections);
    }
}
Also used : RestApi(com.nutomic.syncthingandroid.service.RestApi) MainActivity(com.nutomic.syncthingandroid.activities.MainActivity)

Aggregations

MainActivity (com.nutomic.syncthingandroid.activities.MainActivity)1 RestApi (com.nutomic.syncthingandroid.service.RestApi)1