App url is now flattrd directly

This commit is contained in:
daniel oeh 2012-07-20 18:43:03 +02:00
parent d9841ae43e
commit 7cde39efd2
2 changed files with 7 additions and 8 deletions

View File

@ -35,12 +35,9 @@ public class PreferenceActivity extends SherlockPreferenceActivity {
@Override
public boolean onPreferenceClick(Preference preference) {
Thing appThing = FlattrUtils
.getAppThing(PreferenceActivity.this);
if (appThing != null) {
new FlattrClickWorker(PreferenceActivity.this,
appThing.getUrl()).execute();
}
new FlattrClickWorker(PreferenceActivity.this,
FlattrUtils.APP_URL).execute();
return true;
}
});

View File

@ -39,7 +39,7 @@ public class FlattrUtils {
private static final String PREF_ACCESS_TOKEN = "de.danoeh.antennapod.preference.flattrAccessToken";
/** Flattr URL for this app. */
public static final String APP_URL = "http://flattr.com/thing/745609";
public static final String APP_URL = "http://antennapod.com";
public static final String APP_THING_ID = "745609";
@ -98,7 +98,9 @@ public class FlattrUtils {
public static Thing getAppThing(Context context) {
FlattrService fs = FlattrServiceCreator.getService(retrieveToken());
try {
return fs.getThing(Thing.withId(APP_THING_ID));
Thing thing = fs.getThing(Thing.withId(APP_THING_ID));
Log.i(TAG, "URL is " + thing.getUrl());
return thing;
} catch (FlattrException e) {
e.printStackTrace();
showErrorDialog(context, e.getMessage());