Skip to content

Commit

Permalink
Merge pull request #1178 from Lenkomotive/PAINTROID-525
Browse files Browse the repository at this point in the history
PAINTROID-525 toolspecific options are hidden after leaving fullscree…
  • Loading branch information
juliajulie95 authored Jan 25, 2023
2 parents 429f0d4 + 31ea0dd commit 73096f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ class LandscapeIntegrationTest {
setOrientation(SCREEN_ORIENTATION_LANDSCAPE)
pressBack()
onToolBarView()
.performOpenToolOptionsView()
.performCloseToolOptionsView()
.performOpenToolOptionsView()
}

@Test
Expand All @@ -386,8 +386,8 @@ class LandscapeIntegrationTest {
setOrientation(SCREEN_ORIENTATION_LANDSCAPE)
pressBack()
onToolBarView()
.performOpenToolOptionsView()
.performCloseToolOptionsView()
.performOpenToolOptionsView()
}

@Test
Expand All @@ -401,8 +401,8 @@ class LandscapeIntegrationTest {
setOrientation(SCREEN_ORIENTATION_PORTRAIT)
pressBack()
onToolBarView()
.performOpenToolOptionsView()
.performCloseToolOptionsView()
.performOpenToolOptionsView()
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ open class MainActivityPresenter(

var clippingToolInUseAndUndoRedoClicked = false
var clippingToolPaint = Paint()
var toolOptionsViewWasShown = false

override fun replaceImageClicked() {
checkIfClippingToolNeedsAdjustment()
Expand Down Expand Up @@ -719,9 +720,16 @@ open class MainActivityPresenter(
bottomNavigationViewHolder.show()
toolController.enableToolOptionsView()
perspective.exitFullscreen()
if (toolOptionsViewWasShown) {
toolController.showToolOptionsView()
toolOptionsViewWasShown = false
}
}

private fun enterFullscreen() {
if (toolController.toolOptionsViewVisible()) {
toolOptionsViewWasShown = true
}
view.hideKeyboard()
view.enterFullscreen()
topBarViewHolder.hide()
Expand Down

0 comments on commit 73096f2

Please sign in to comment.