finally read APG version dynamicly, so the version name doesn't have to be changed anywhere but the manifest

This commit is contained in:
Thialfihar
2010-06-08 13:46:21 +00:00
parent ce1120b66e
commit 315093c5bc
4 changed files with 39 additions and 7 deletions

View File

@@ -157,7 +157,7 @@ public class BaseActivity extends Activity
case Id.dialog.about: {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("About " + Apg.FULL_VERSION);
alert.setTitle("About " + Apg.getFullVersion(this));
LayoutInflater inflater =
(LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@@ -448,12 +448,13 @@ public class BaseActivity extends Activity
}
public boolean hasSeenChangeLog() {
return mPreferences.getBoolean(Constants.pref.has_seen_change_log, false);
return mPreferences.getBoolean(Constants.pref.has_seen_change_log + Apg.getVersion(this),
false);
}
public void setHasSeenChangeLog(boolean value) {
SharedPreferences.Editor editor = mPreferences.edit();
editor.putBoolean(Constants.pref.has_seen_change_log, value);
editor.putBoolean(Constants.pref.has_seen_change_log + Apg.getVersion(this), value);
editor.commit();
}