Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAINTROID-525 toolspecific options are hidden after leaving fullscree… #1178

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -148,6 +148,7 @@ open class MainActivityPresenter(

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

override fun replaceImageClicked() {
checkIfClippingToolNeedsAdjustment()
Expand Down Expand Up @@ -716,9 +717,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