forked from organicmaps/organicmaps
[android] Improvements to pedestrian dialogs logic.
This commit is contained in:
parent
03f6205524
commit
82b53f3713
3 changed files with 11 additions and 6 deletions
|
@ -10,6 +10,7 @@ import android.util.Log;
|
|||
import com.google.gsonaltered.Gson;
|
||||
import com.mapswithme.country.ActiveCountryTree;
|
||||
import com.mapswithme.country.CountryItem;
|
||||
import com.mapswithme.maps.ads.LikesManager;
|
||||
import com.mapswithme.maps.background.Notifier;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
import com.mapswithme.util.Constants;
|
||||
|
@ -290,6 +291,9 @@ public class MwmApplication extends android.app.Application implements ActiveCou
|
|||
{
|
||||
nativeSetInt(LAUNCH_NUMBER_SETTING, 0);
|
||||
nativeSetInt(SESSION_NUMBER_SETTING, 0);
|
||||
nativeSetLong(LAST_SESSION_TIMESTAMP_SETTING, 0);
|
||||
nativeSetInt(LikesManager.LAST_RATED_SESSION, 0);
|
||||
updateSessionsNumber();
|
||||
}
|
||||
|
||||
private void updateLaunchNumbers()
|
||||
|
|
|
@ -33,6 +33,7 @@ public abstract class BasePedestrianDialogFragment extends BaseMwmDialogFragment
|
|||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
LikesManager.setRatingApplied(BasePedestrianDialogFragment.this.getClass(), true);
|
||||
Statistics.INSTANCE.trackSimpleNamedEvent(Statistics.EventName.FACEBOOK_PEDESTRIAN_CANCEL);
|
||||
}
|
||||
}).
|
||||
|
|
|
@ -66,12 +66,6 @@ public enum LikesManager
|
|||
// sOldUsersMapping.put(44, LikeType.GPLUS_OLD_USERS);
|
||||
sOldUsersMapping.put(50, LikeType.FACEBOOK_INVITES_OLD_USERS);
|
||||
|
||||
if (MwmApplication.get().nativeGetInt(PEDESTRIAN_COUNT, 0) >= 3)
|
||||
{
|
||||
sOldUsersMapping.put(SESSION_NUM, LikeType.FACEBOOK_PEDESTRIAN_MASTER_OLD_USERS);
|
||||
sNewUsersMapping.put(SESSION_NUM, LikeType.FACEBOOK_PEDESTRIAN_MASTER_OLD_USERS);
|
||||
}
|
||||
|
||||
sNewUsersMapping.put(3, LikeType.GPLAY_NEW_USERS);
|
||||
sNewUsersMapping.put(9, LikeType.FACEBOOK_INVITE_NEW_USERS);
|
||||
sNewUsersMapping.put(10, LikeType.GPLAY_NEW_USERS);
|
||||
|
@ -81,6 +75,12 @@ public enum LikesManager
|
|||
sNewUsersMapping.put(35, LikeType.FACEBOOK_INVITE_NEW_USERS);
|
||||
sNewUsersMapping.put(50, LikeType.GPLUS_NEW_USERS);
|
||||
sNewUsersMapping.put(55, LikeType.FACEBOOK_INVITE_NEW_USERS);
|
||||
|
||||
if (MwmApplication.get().nativeGetInt(PEDESTRIAN_COUNT, 0) >= 3 && !isRatingApplied(PedestrianMasterDialogFragment.class))
|
||||
{
|
||||
sOldUsersMapping.put(SESSION_NUM, LikeType.FACEBOOK_PEDESTRIAN_MASTER_OLD_USERS);
|
||||
sNewUsersMapping.put(SESSION_NUM, LikeType.FACEBOOK_PEDESTRIAN_MASTER_OLD_USERS);
|
||||
}
|
||||
}
|
||||
|
||||
private final boolean mIsNewUser = MwmApplication.get().getFirstInstallVersion() == BuildConfig.VERSION_CODE;
|
||||
|
|
Loading…
Add table
Reference in a new issue