Skip to content

Commit

Permalink
Use the CHANGELOG.md as the lone source of release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
ccomeaux committed Oct 30, 2015
1 parent dc02e31 commit 35ebbef
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 140 deletions.
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ android {
targetSdkVersion 23
versionCode 50
versionName "5.1.1"
buildConfigField "String", "BRANCH", "\"" + getBranchName() + "\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
// applicationIdSuffix ".debug"
versionNameSuffix '-' + getBranchName()
}
}
Expand Down
28 changes: 28 additions & 0 deletions app/src/main/java/com/boardgamegeek/pref/ChangeLogPreference.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.boardgamegeek.pref;

import android.content.Context;
import android.preference.Preference;
import android.util.AttributeSet;

import com.boardgamegeek.BuildConfig;
import com.boardgamegeek.util.ActivityUtils;

public class ChangeLogPreference extends Preference {
public ChangeLogPreference(Context context) {
super(context);
}

public ChangeLogPreference(Context context, AttributeSet attrs) {
super(context, attrs);
}

public ChangeLogPreference(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}

@Override
protected void onClick() {
String changeLogUrl = String.format("https://github.com/ccomeaux/boardgamegeek4android/blob/%s/CHANGELOG.md", BuildConfig.BRANCH);
ActivityUtils.link(getContext(), changeLogUrl);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
private final static String ACTION_SYNC = "com.boardgamegeek.prefs.SYNC";
private final static String ACTION_ADVANCED = "com.boardgamegeek.prefs.ADVANCED";
private final static String ACTION_ABOUT = "com.boardgamegeek.prefs.ABOUT";
private static final ArrayMap<String, Integer> mFragmentMap = buildFragmentMap();
private static final ArrayMap<String, Integer> FRAGMENT_MAP = buildFragmentMap();

private static ArrayMap<String, Integer> buildFragmentMap() {
ArrayMap<String, Integer> map = new ArrayMap<>();
Expand All @@ -44,7 +44,7 @@ private void buildLegacyPreferences() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
String action = getIntent().getAction();
if (action != null) {
Integer fragmentId = mFragmentMap.get(action);
Integer fragmentId = FRAGMENT_MAP.get(action);
if (fragmentId != null) {
addPreferencesFromResource(fragmentId);
}
Expand Down Expand Up @@ -90,7 +90,7 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String fragment = getArguments().getString("fragment");
if (fragment != null) {
Integer fragmentId = mFragmentMap.get(fragment);
Integer fragmentId = FRAGMENT_MAP.get(fragment);
if (fragmentId != null) {
addPreferencesFromResource(fragmentId);
}
Expand Down
36 changes: 5 additions & 31 deletions app/src/main/java/com/boardgamegeek/pref/VersionPreference.java
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
package com.boardgamegeek.pref;

import android.content.Context;
import android.preference.DialogPreference;
import android.support.annotation.NonNull;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.preference.Preference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import com.boardgamegeek.R;
import com.boardgamegeek.util.HelpUtils;
import com.boardgamegeek.util.ListTagHandler;

public class VersionPreference extends DialogPreference {
public class VersionPreference extends Preference {
public VersionPreference(Context context) {
super(context);
}

public VersionPreference(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}

public VersionPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}

private void init() {
setDialogTitle("");
setDialogLayoutResource(R.layout.dialog_about);
setPositiveButtonText(R.string.close);
setNegativeButtonText("");
}

@Override
public CharSequence getSummary() {
return HelpUtils.getVersionName(getContext());
}

@Override
protected void onBindDialogView(@NonNull View view) {
super.onBindDialogView(view);
TextView nameAndVersionView = (TextView) view.findViewById(R.id.app_name_and_version);
TextView aboutBodyView = (TextView) view.findViewById(R.id.about_body);

nameAndVersionView.setText(Html.fromHtml(getContext().getString(R.string.pref_about_app_name_and_version,
HelpUtils.getVersionName(getContext()))));
aboutBodyView.setMovementMethod(new LinkMovementMethod());
aboutBodyView.setText(Html.fromHtml(getContext().getString(R.string.pref_about_body), null,
new ListTagHandler()));
}
}
107 changes: 1 addition & 106 deletions app/src/main/res/values/strings_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,112 +79,7 @@
<string name="pref_advanced_notify_errors_on">You will see the details of a crash in the notification bar - send this info to the developers!</string>
<string name="pref_about">About</string>
<string name="pref_about_version">Version</string>
<string name="pref_about_app_name_and_version"><![CDATA[<b>BoardGameGeek</b> <font color="#888888">%s</font>]]></string>
<string name="pref_about_body"><![CDATA[
<h4>What\'s New?</h4>
<h5>Coming Soon</h5>
<ul>
<li>Pull to refresh pretty much everywhere there used to be a menu option</li>
<li>More (and better looking) play stats</li>
<li>12 % more Material</li>
<li>Search improvements</li>
<li>Bug fixes and stability improvements</li>
</ul>
<h5>5.1.1</h5>
<ul>
<li>Fix crash when accessing settings on pre-Lollipop devices</li>
<li>Bug fixes and stability improvements</li>
</ul>
<h5>5.1</h5>
<ul>
<li>Export/import some data (under Advanced Settings)</li>
<li>Pick your favorite colors and assign them while logging plays</li>
<li>Improve list usability</li>
<li>Updated look and feel of nav drawer</li>
<li>Improve score input</li>
<li>Time-based data is updated automatically (e.g. 5 mins ago becomes 6 mins ago)</li>
<li>Fix forum and GeekList links and images</li>
<li>Bug fixes and stability improvements</li>
</ul>
<h5>5.0.2</h5>
<ul>
<li>Darken font in a couple of areas for readability</li>
<li>Cap game\'s plays per month at total play count</li>
<li>More bug fixes and stability improvements</li>
</ul>
<h5>5.0.1</h5>
<ul>
<li>Suppress H-Index notification if it\'s 0</li>
<li>Bug fixes and stability improvements</li>
</ul>
<h5>5.0</h5>
<ul>
<li>Material design and support for Android Lollipop</li>
<li>GeekLists</li>
<li>Play stats</li>
<li>Improved sync and sync notification messages</li>
<li>Use Google Now to search by voice by saying \"search <i>game name</i> on BoardGameGeek\"</li>
<li>Access and edit play locations, players, and stats from the navigation drawer</li>
<li>Zoom and pan game images</li>
<li>Default collection view shows only items you\'ve requested to sync</li>
<li>Sort collection by rank</li>
<li>Filter collection by play count</li>
<li>Quick log multiple plays when viewing a list</li>
<li>Probably lots of other improvements</li>
<li>Miscellaneous bug fixes</li>
</ul>
<h5>4.8.4</h5>
<ul>
<li>Fixed syncing (again!)</li>
</ul>
<h5>4.8.3</h5>
<ul>
<li>Syncing improvements (fewer 503s)</li>
</ul>
<h5>4.8.2</h5>
<ul>
<li>Fixed displaying images</li>
</ul>
<h5>4.8.1</h5>
<ul>
<li>Fixed incorrect statistics (including rating)</li>
<li>Can now select a random game from a buddy\'s collection</li>
<li>Miscellaneous bug fixes</li>
</ul>
<h5>4.8</h5>
<ul>
<li>Now syncs played games that aren\'t otherwise in your collection</li>
<li>Now syncs accessories (though this will break the base game/expansion filter until the next complete collection sync)</li>
<li>Lots of usability improvements around logging plays</li>
<li>View all players along with GeekBuddies</li>
<li>Completely rewritten syncing logic</li>
</ul>
<h5>4.7.3</h5>
<ul>
<li>Fix crashes in forums and ordering players</li>
<li>Change look and feel of navigation drawer</li>
<li>Modernize the look of the slider in the filter dialog</li>
<li>Show the collection properly when adding a shortcut</li>
</ul>
<h5>4.7.2</h5>
<ul>
<li>Fix crash when viewing buddy collection</li>
<li>Don\'t allow clicking on forum header</li>
<li>When saving a view, enable the Save button correctly<li>
<li>When deleting a view, go back to the default view</li>
<li>Improve format of forum for narrow screens</li>
<li>Clicking the h-index notification takes you to a BGG thread</li>
</ul>
<h5>4.7.1</h5>
<ul>
<li>No more crashes</li>
</ul>
<ul>
<li><a href="https://code.google.com/p/boardgamegeek/wiki/ReleaseNotes">What was new in previous versions?</a></li>
</ul>
<br/>
Special thanks to <a href="http://www.boardgamegeek.com">BoardGameGeek</a>. We\'re not affiliated with them, but this app wouldn\'t be possible without their support and permission. Follow the <a href="http://boardgamegeek.com/thread/543998">thread</a> there.
]]></string>
<string name="pref_change_log">Release notes</string>
<string name="pref_about_licenses">Open source licenses</string>
<string name="pref_about_contact_us">Contact Us</string>
<string name="pref_about_contact_us_summary">bgg4android@gmail.com</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/xml/preference_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

<com.boardgamegeek.pref.VersionPreference android:title="@string/pref_about_version"/>

<com.boardgamegeek.pref.ChangeLogPreference android:title="@string/pref_change_log"/>

<PreferenceScreen android:title="Authors">
<com.boardgamegeek.pref.BuddyPreference
android:summary="rjnfc"
Expand Down

0 comments on commit 35ebbef

Please sign in to comment.