mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
Disable swipe back in google map view
This commit is contained in:
parent
0b0d485093
commit
99bdc317ac
3 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
|
|||
@Override
|
||||
public boolean onFragmentCreate() {
|
||||
super.onFragmentCreate();
|
||||
swipeBackEnabled = false;
|
||||
NotificationCenter.getInstance().addObserver(this, MessagesController.closeChats);
|
||||
if (messageObject != null) {
|
||||
NotificationCenter.getInstance().addObserver(this, MessagesController.updateInterfaces);
|
||||
|
|
|
@ -265,6 +265,10 @@ public class ActionBarActivity extends Activity {
|
|||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
if(android.os.Build.VERSION.SDK_INT >= 11 && !checkTransitionAnimation() && !inActionMode && fragmentsStack.size() > 1 && !animationInProgress) {
|
||||
if (ev != null && ev.getAction() == MotionEvent.ACTION_DOWN && !startedTracking && !maybeStartTracking) {
|
||||
BaseFragment currentFragment = fragmentsStack.get(fragmentsStack.size() - 1);
|
||||
if (!currentFragment.swipeBackEnabled) {
|
||||
return false;
|
||||
}
|
||||
startedTrackingPointerId = ev.getPointerId(0);
|
||||
maybeStartTracking = true;
|
||||
startedTrackingX = (int) ev.getX();
|
||||
|
|
|
@ -28,6 +28,7 @@ public class BaseFragment {
|
|||
protected int classGuid = 0;
|
||||
protected Bundle arguments;
|
||||
private AlertDialog visibleDialog = null;
|
||||
protected boolean swipeBackEnabled = true;
|
||||
|
||||
public BaseFragment() {
|
||||
classGuid = ConnectionsManager.getInstance().generateClassGuid();
|
||||
|
|
Loading…
Reference in a new issue