Merge pull request #5710 from milchakov/newcomers_message_master

[android] Change logic for newcomers message
This commit is contained in:
Aleksandr Zatsepin 2017-03-28 16:44:28 +03:00 committed by GitHub
commit 00c48a3cf0

View file

@ -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();
}
})