-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
[android] [ios] Split the deactivate PP and switch fullscreen mode logic #8443
base: master
Are you sure you want to change the base?
[android] [ios] Split the deactivate PP and switch fullscreen mode logic #8443
Conversation
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
Opened PP is always closed on long tap in any mode (search, route planning,...), correct? |
Yes. |
@kirylkaveryn made changes to Android. Introduced |
0b5bae3
to
3c678fa
Compare
Thank you very much! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM
@Jean-BaptisteC can you please help with testing opening/closing PP and switching full-screen mode in different scenarios on Android?
3c678fa
to
ab4b141
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It works for Android too, right?
@@ -1239,7 +1239,7 @@ public void onPlacePageDeactivated() | |||
@SuppressWarnings("unused") | |||
public void onSwitchFullScreenMode() | |||
{ | |||
if ((mPanelAnimator && mPanelAnimator.isVisible()) ||UiUtils.isVisible(mSearchController.getToolbar())) | |||
if ((mPanelAnimator && mPanelAnimator.isVisible()) || UiUtils.isVisible(mSearchController.getToolbar())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 Sorry, it's Java, not C++. Let's return the comparison back, polish commits, and merge.
/home/runner/work/organicmaps/organicmaps/android/app/src/main/java/app/organicmaps/MwmActivity.java:1242: error: bad operand types for binary operator '&&'
if ((mPanelAnimator && mPanelAnimator.isVisible()) || UiUtils.isVisible(mSearchController.getToolbar()))
^
first type: PanelAnimator
second type: boolean
Added onSwitchFullScreenMode listener call from JNI Signed-off-by: S. Kozyr <s.trump@gmail.com>
ed5b932
to
dd05917
Compare
@biodranik Fixed compilation errors. Squashed Android commits. Should fix actions |
Closes #8442
The old logic when the dismissing method should control not only the PP dismissing but also the fullscreen mode toggling contains too many responsibilities, and produces unexpected behavior (if the PP is opened and the user long taps on the map the PP will be dismissed but the side buttons not - ios, or deeplink handling hides the side buttons - ios), and hard to read and debug.
This PR continues #7876 and splits the
DeactivateMapSelection(bool notifyUI)
into theDeactivateMapSelection()
andSwitchFullScreen()
.The additional callback
m_onSwitchFullScreen = std::move(onSwitchFullScreen);
was added.Fullscreen mode switching is blocked when:
Todo:
Results:
enter/exit the fullscreen mode independently from the PP
entering the fullscreen mode is inactive during the navigation or searching