From ddf80f13c56c092ab32c26346f8e1836938d4f89 Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Tue, 28 Mar 2017 12:31:49 +0300 Subject: [PATCH] [android] change logic for newcomers message --- .../maps/editor/EditorHostFragment.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java index 9808d0ea86..6bc9f44f28 100644 --- a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java +++ b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java @@ -284,23 +284,11 @@ public class EditorHostFragment extends BaseMwmToolbarFragment if (!setEdits()) return; - // Save note - final String note = ((EditorFragment) getChildFragmentManager().findFragmentByTag(EditorFragment.class.getName())).getDescription(); - if (note.length() != 0) - Editor.nativeCreateNote(note); // Save object edits if (!MwmApplication.prefs().contains(NOOB_ALERT_SHOWN)) - { - MwmApplication.prefs().edit() - .putBoolean(NOOB_ALERT_SHOWN, true) - .apply(); - showNoobDialog(); - } else - { saveMapObjectEdits(); - } break; } @@ -354,6 +342,14 @@ public class EditorHostFragment extends BaseMwmToolbarFragment @Override public void onClick(DialogInterface dlg, int which) { + MwmApplication.prefs().edit() + .putBoolean(NOOB_ALERT_SHOWN, true) + .apply(); + // Save note + final String note = ((EditorFragment) getChildFragmentManager().findFragmentByTag(EditorFragment.class.getName())).getDescription(); + if (note.length() != 0) + Editor.nativeCreateNote(note); + // Save edits saveMapObjectEdits(); } })