diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-10-19 10:59:29 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-10-19 10:59:29 +0200 |
| commit | 898456bcf181714d9dfaff12f9c37dce74b4ea1c (patch) | |
| tree | f04cf56a38441c174f51ac75e487ffba1cc77cd3 /main/src/cgeo/geocaching/twitter/Twitter.java | |
| parent | 2093ea462db4d8e56282de5871c58579a023d7cf (diff) | |
| download | cgeo-898456bcf181714d9dfaff12f9c37dce74b4ea1c.zip cgeo-898456bcf181714d9dfaff12f9c37dce74b4ea1c.tar.gz cgeo-898456bcf181714d9dfaff12f9c37dce74b4ea1c.tar.bz2 | |
fix #3368: New placeholer [LOG] for twitter template
Diffstat (limited to 'main/src/cgeo/geocaching/twitter/Twitter.java')
| -rw-r--r-- | main/src/cgeo/geocaching/twitter/Twitter.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/twitter/Twitter.java b/main/src/cgeo/geocaching/twitter/Twitter.java index 3dd1e17..670165e 100644 --- a/main/src/cgeo/geocaching/twitter/Twitter.java +++ b/main/src/cgeo/geocaching/twitter/Twitter.java @@ -3,6 +3,7 @@ package cgeo.geocaching.twitter; import cgeo.geocaching.CgeoApplication; import cgeo.geocaching.DataStore; import cgeo.geocaching.Geocache; +import cgeo.geocaching.LogEntry; import cgeo.geocaching.Trackable; import cgeo.geocaching.enumerations.LoadFlags; import cgeo.geocaching.geopoint.Geopoint; @@ -23,9 +24,9 @@ public final class Twitter { private static final String HASH_PREFIX_WITH_BLANK = " #"; private static final int MAX_TWEET_SIZE = 140; - public static void postTweetCache(String geocode) { + public static void postTweetCache(String geocode, LogEntry logEntry) { final Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB); - postTweet(CgeoApplication.getInstance(), getStatusMessage(cache), null); + postTweet(CgeoApplication.getInstance(), getStatusMessage(cache, logEntry), null); } public static void postTweetTrackable(String geocode) { @@ -72,8 +73,8 @@ public final class Twitter { } } - static String getStatusMessage(Geocache cache) { - return appendHashTags(LogTemplateProvider.applyTemplates(Settings.getCacheTwitterMessage(), new LogContext(cache))); + static String getStatusMessage(Geocache cache, LogEntry logEntry) { + return appendHashTags(LogTemplateProvider.applyTemplates(Settings.getCacheTwitterMessage(), new LogContext(cache, logEntry))); } static String getStatusMessage(Trackable trackable) { |
