Updated version code, translations and changelog.

This commit is contained in:
Karim Abou Zeid 2015-12-30 18:37:40 +01:00
commit 176fce9ab5
5 changed files with 31 additions and 10 deletions

View file

@ -63,8 +63,8 @@ android {
renderscriptTargetApi 23
applicationId "com.kabouzeid.gramophone"
versionCode 84
versionName "0.9.50 PREVIEW 4"
versionCode 85
versionName "0.9.50 RC"
}
buildTypes {
release {

View file

@ -25,6 +25,15 @@
<p>You can view the changelog dialog again at any time from the <i>about</i> section.</p>
<h3>Version 0.9.50 RC</h3>
<ol>
<li><b>NEW:</b> Added introduction.</li>
<li><b>IMPROVEMENT:</b> Synced translations.</li>
<li><b>FIX:</b> Android Marshmallows dark statusbar icons not showing up in the search.</li>
<li><b>FIX:</b> Some coloring bugs with the black theme.</li>
</ol>
<h3>Version 0.9.50 PREVIEW 4</h3>
<p>You can always downgrade by downloading the old apk from <i>APKMirror</i> for example.</p>

View file

@ -14,6 +14,7 @@ import com.github.paolorotolo.appintro.AppIntro;
import com.github.paolorotolo.appintro.AppIntroFragment;
import com.kabouzeid.gramophone.R;
import com.kabouzeid.gramophone.util.ColorUtil;
import com.kabouzeid.gramophone.util.PreferenceUtil;
/**
* @author Karim Abou Zeid (kabouzeid)
@ -69,4 +70,16 @@ public class IntroActivity extends AppIntro {
}
}, 2000);
}
@Override
public void onSkipPressed() {
super.onSkipPressed();
PreferenceUtil.getInstance(this).setIntroShown();
}
@Override
public void onDonePressed() {
super.onDonePressed();
PreferenceUtil.getInstance(this).setIntroShown();
}
}

View file

@ -118,8 +118,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
checkChangelog();
PreferenceUtil.getInstance(this).incrementAppOpenCount();
if (PreferenceUtil.getInstance(this).getAppOpenCount() == 1) {
if (!PreferenceUtil.getInstance(this).introShown()) {
// let the app intro handle getting the permissions first
introActivityHandlingPermissions = true;
new Handler().postDelayed(new Runnable() {

View file

@ -61,8 +61,7 @@ public final class PreferenceUtil {
public static final String IGNORE_MEDIA_STORE_ARTWORK = "ignore_media_store_artwork";
public static final String LAST_CHANGELOG_VERSION = "last_changelog_version";
public static final String APP_OPEN_COUNT = "app_open_count";
public static final String INTRO_SHOWN = "intro_shown";
private static PreferenceUtil sInstance;
@ -364,11 +363,12 @@ public final class PreferenceUtil {
return mPreferences.getInt(LAST_CHANGELOG_VERSION, -1);
}
public void incrementAppOpenCount() {
mPreferences.edit().putInt(APP_OPEN_COUNT, getAppOpenCount() + 1).apply();
public void setIntroShown() {
// don't use apply here
mPreferences.edit().putBoolean(INTRO_SHOWN, true).commit();
}
public final int getAppOpenCount() {
return mPreferences.getInt(APP_OPEN_COUNT, 0);
public final boolean introShown() {
return mPreferences.getBoolean(INTRO_SHOWN, false);
}
}