diff --git a/android/beagle/src/main/java/br/com/zup/beagle/android/view/BeagleActivity.kt b/android/beagle/src/main/java/br/com/zup/beagle/android/view/BeagleActivity.kt index 50b683e1ed..6d82d6db90 100644 --- a/android/beagle/src/main/java/br/com/zup/beagle/android/view/BeagleActivity.kt +++ b/android/beagle/src/main/java/br/com/zup/beagle/android/view/BeagleActivity.kt @@ -158,6 +158,8 @@ abstract class BeagleActivity : AppCompatActivity() { } } + fun hasServerDrivenScreen(): Boolean = supportFragmentManager.backStackEntryCount > 0 + fun navigateTo(screenRequest: ScreenRequest, screen: Screen?) { fetch(screenRequest, screen?.toComponent()) } diff --git a/android/sample/src/main/java/br/com/zup/beagle/sample/activities/SampleServerDrivenActivity.kt b/android/sample/src/main/java/br/com/zup/beagle/sample/activities/SampleServerDrivenActivity.kt index edf121c16a..e6780bfe20 100644 --- a/android/sample/src/main/java/br/com/zup/beagle/sample/activities/SampleServerDrivenActivity.kt +++ b/android/sample/src/main/java/br/com/zup/beagle/sample/activities/SampleServerDrivenActivity.kt @@ -21,7 +21,6 @@ import android.view.View import android.widget.Button import android.widget.FrameLayout import android.widget.ProgressBar -import android.widget.Toast import androidx.appcompat.widget.Toolbar import br.com.zup.beagle.android.annotation.BeagleComponent import br.com.zup.beagle.android.view.BeagleActivity