forked from I2P_Developers/i2p.i2p
- Force news refetch after URL change
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package net.i2p.router.web;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.crypto.TrustedUpdate;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.util.FileUtil;
|
||||
@@ -78,7 +77,7 @@ public class ConfigUpdateHandler extends FormHandler {
|
||||
if (_action == null)
|
||||
return;
|
||||
if (_action.equals(_("Check for updates"))) {
|
||||
NewsFetcher fetcher = NewsFetcher.getInstance(I2PAppContext.getGlobalContext());
|
||||
NewsFetcher fetcher = NewsFetcher.getInstance(_context);
|
||||
fetcher.fetchNews();
|
||||
if (fetcher.shouldFetchUnsigned())
|
||||
fetcher.fetchUnsignedHead();
|
||||
@@ -100,6 +99,7 @@ public class ConfigUpdateHandler extends FormHandler {
|
||||
String oldURL = ConfigUpdateHelper.getNewsURL(_context);
|
||||
if ( (oldURL == null) || (!_newsURL.equals(oldURL)) ) {
|
||||
_context.router().setConfigSetting(PROP_NEWS_URL, _newsURL);
|
||||
NewsFetcher.getInstance(_context).invalidateNews();
|
||||
addFormNotice(_("Updating news URL to") + " " + _newsURL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user