projects/syncslides/app/src/main/java/io/v/android/apps/syncslides/db/CurrentSlideWatcher.java
/**
     * Adds a listener for this deckId/presentationId.
     *
     * @param listener notified when the current slide changes
     */
Adds a listener for this deckId/presentationId.
@param listener notified when the current slide changes
Adds a listener for this deckId / presentationId . @param listener notified when the current slide changes
public void addListener(final DB.CurrentSlideListener listener) {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                listener.onChange(mCurrentSlide.getNum());
            }
        });
        mListeners.add(listener);
        if (mListeners.size() == 1) {
            Log.i(TAG, "Starting thread");
            mThread.start();
        }
    }
public void addListener ( final DB . CurrentSlideListener listener ) { mHandler . post ( new Runnable ( ) { @ Override public void run ( ) { listener . onChange ( mCurrentSlide . getNum ( ) ) ; } } ) ; mListeners . add ( listener ) ; if ( mListeners . size ( ) == 1 ) { Log . i ( TAG , "Starting thread" ) ; mThread . start ( ) ; } }
Adds a listener for this deckId/presentationId.
Adds a listener for this deckId / presentationId .
// The first listener was just added.