mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
fix survey request display logic
This commit is contained in:
parent
b278696a30
commit
e04f7c8f35
1 changed files with 7 additions and 5 deletions
|
@ -513,7 +513,7 @@ public class Utils {
|
||||||
private static void setFirstBootStatics( Context context )
|
private static void setFirstBootStatics( Context context )
|
||||||
{
|
{
|
||||||
if ( null == s_isFirstBootThisVersion ) {
|
if ( null == s_isFirstBootThisVersion ) {
|
||||||
int thisVersion = getAppVersion( context );
|
final int thisVersion = getAppVersion( context );
|
||||||
int prevVersion = 0;
|
int prevVersion = 0;
|
||||||
SharedPreferences prefs =
|
SharedPreferences prefs =
|
||||||
context.getSharedPreferences( HIDDEN_PREFS,
|
context.getSharedPreferences( HIDDEN_PREFS,
|
||||||
|
@ -530,11 +530,13 @@ public class Utils {
|
||||||
s_isFirstBootThisVersion = new Boolean( newVersion );
|
s_isFirstBootThisVersion = new Boolean( newVersion );
|
||||||
s_isFirstBootEver = new Boolean( -1 == prevVersion );
|
s_isFirstBootEver = new Boolean( -1 == prevVersion );
|
||||||
|
|
||||||
int firstVersion = prefs.getInt( FIRST_VERSION_KEY, thisVersion );
|
int firstVersion = prefs.getInt( FIRST_VERSION_KEY, 0 );
|
||||||
s_firstVersion = new Boolean( firstVersion == thisVersion );
|
s_firstVersion = new Boolean( firstVersion == thisVersion );
|
||||||
if ( newVersion || s_firstVersion ) {
|
if ( newVersion || 0 == firstVersion ) {
|
||||||
SharedPreferences.Editor editor = prefs.edit()
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
.putInt( SHOWN_VERSION_KEY, thisVersion );
|
if ( newVersion ) {
|
||||||
|
editor.putInt( SHOWN_VERSION_KEY, thisVersion );
|
||||||
|
}
|
||||||
if ( 0 == firstVersion ) {
|
if ( 0 == firstVersion ) {
|
||||||
editor.putInt( FIRST_VERSION_KEY, thisVersion );
|
editor.putInt( FIRST_VERSION_KEY, thisVersion );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue