Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
🐛 Adds method to check if the activity have a server driven screen lo…
Browse files Browse the repository at this point in the history
…aded (#800)

Signed-off-by: Hernand Azevedo <[email protected]>
  • Loading branch information
hernandazevedozup authored Aug 24, 2020
1 parent 52164ec commit 9afea87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ abstract class BeagleActivity : AppCompatActivity() {
}
}

fun hasServerDrivenScreen(): Boolean = supportFragmentManager.backStackEntryCount > 0

fun navigateTo(screenRequest: ScreenRequest, screen: Screen?) {
fetch(screenRequest, screen?.toComponent())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9afea87

Please sign in to comment.