GetJedi/app/src/main/java/edu/getjedi/frontend/mobile/state/ClientLoggedState.java
private void init(final AppContext context) {
        context.getScreen().setMenuItems(new String[]{context.getUser().getFirstName() + " " + context.getUser().getLastName(), StringTable.CLIENT, " ", StringTable.FILTER_TITLE, StringTable.LOGOFF});
        this.context = context;
        timer = new Handler();
        services = users = null;
        priceFilter = rayFilter = null;
        markers = new ArrayList<>();
        timer.postDelayed(new Runnable() {
            @Override
            public void run() {
                context.getScreen().getHttpHandler().makeRequestForArray(new String[]{"services"});
                context.getScreen().getHttpHandler().makeRequestForArray(new String[]{"users"});
                if (context.getState() instanceof ClientLoggedState) {
                    timer.postDelayed(this, context.getUpdateInterval());
                }
            }
        }, context.getUpdateInterval());
    }
/**
     * Initializes this state.
     * For every context.getUpdateInterval(), queries the server for services and professionals nearby.
     * Changes the left menu content to show the options available for a Client.
     */
Initializes this state.
For every context.getUpdateInterval(), queries the server for services and professionals nearby.
Changes the left menu content to show the options available for a Client.
Initializes this state . For every context . getUpdateInterval () queries the server for services and professionals nearby . Changes the left menu content to show the options available for a Client .
private void init(final AppContext context) {
        context.getScreen().setMenuItems(new String[]{context.getUser().getFirstName() + " " + context.getUser().getLastName(), StringTable.CLIENT, " ", StringTable.FILTER_TITLE, StringTable.LOGOFF});
        this.context = context;
        timer = new Handler();
        services = users = null;
        priceFilter = rayFilter = null;
        markers = new ArrayList<>();
        timer.postDelayed(new Runnable() {
            @Override
            public void run() {
                context.getScreen().getHttpHandler().makeRequestForArray(new String[]{"services"});
                context.getScreen().getHttpHandler().makeRequestForArray(new String[]{"users"});
                if (context.getState() instanceof ClientLoggedState) {
                    timer.postDelayed(this, context.getUpdateInterval());
                }
            }
        }, context.getUpdateInterval());
    }
private void init ( final AppContext context ) { context . getScreen ( ) . setMenuItems ( new String [ ] { context . getUser ( ) . getFirstName ( ) + " " + context . getUser ( ) . getLastName ( ) , StringTable . CLIENT , " " , StringTable . FILTER_TITLE , StringTable . LOGOFF } ) ; this . context = context ; timer = new Handler ( ) ; services = users = null ; priceFilter = rayFilter = null ; markers = new ArrayList < > ( ) ; timer . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { context . getScreen ( ) . getHttpHandler ( ) . makeRequestForArray ( new String [ ] { "services" } ) ; context . getScreen ( ) . getHttpHandler ( ) . makeRequestForArray ( new String [ ] { "users" } ) ; if ( context . getState ( ) instanceof ClientLoggedState ) { timer . postDelayed ( this , context . getUpdateInterval ( ) ) ; } } } , context . getUpdateInterval ( ) ) ; }
Initializes this state.
Initializes this state .