/*
 * Copyright (c) 2017-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

package com.facebook.litho.sections;

import com.facebook.litho.annotations.Event;
import javax.annotation.Nullable;

/**
 * Sections should implement this method to receive events about their children's loading state.
 * An example of the correct usage is:
 *
 * <pre>
 * {@code
 *
 * @OnEvent(LoadingEvent.class)
 * static void onLoadingStateChanged(
 *    @FromEvent LoadingState loadingState,
 *    @Param SectionContext context,
 *    @Prop int someProp) {
 *      context.updateLoadingState(loadingState);
 * }
 * </pre>
 */
@Event
public class LoadingEvent {
  public enum LoadingState {
    INITIAL_LOAD,
    LOADING,
    SUCCEEDED,
    FAILED
  }

  //Whether after this loading event the dataset is still empty
  public boolean isEmpty;
  // Either INITIAL_LOAD, LOADING, SUCCEEDED OR FAILED
  public LoadingState loadingState;
  // The reason for LOAD_FAILED events.
  public @Nullable Throwable t;
}

@@ -524,14 +524,14 @@
 ate.
-%0A *
  An
+%0A *
  exa
@@ -579,22 +579,33 @@
 %0A * 
-%7B@
+%3C
 code
+%3E
 %0A *%0A * 
-@
+%7B@literal @%7D
 OnEv
@@ -630,16 +630,17 @@
 lass)%0A *
+ 
  static 
@@ -673,17 +673,29 @@
 (%0A *    
-@
+ %7B@literal @%7D
 FromEven
@@ -729,17 +729,29 @@
 ,%0A *    
-@
+ %7B@literal @%7D
 Param Se
@@ -778,17 +778,29 @@
 ,%0A *    
-@
+ %7B@literal @%7D
 Prop int
@@ -814,16 +814,17 @@
 op) %7B%0A *
+ 
       co
@@ -866,17 +866,29 @@
 te);%0A * 
-%7D
+ %7D%0A * %3C/code%3E
 %0A * %3C/pr
@@ -1243,23 +1243,16 @@
 ents.%0A  
-public 
 @Nullabl
@@ -1253,16 +1253,23 @@
 ullable 
+public 
 Throwabl

Fix LoadingEvent javadoc