made plugin update interval configurable

This commit is contained in:
Philipp Schaefer
2014-05-16 17:43:40 +02:00
parent 4bec474b21
commit 7c68567d17
4 changed files with 40 additions and 3 deletions

View File

@ -145,6 +145,7 @@ public class IITC_Mobile extends Activity
mIitcWebView.updateFullscreenStatus();
mFileManager = new IITC_FileManager(this);
mFileManager.setUpdateInterval(Integer.parseInt(mSharedPrefs.getString("pref_update_plugins_interval", "7")));
mUserLocation = new IITC_UserLocation(this);
mUserLocation.setLocationMode(Integer.parseInt(mSharedPrefs.getString("pref_user_location_mode", "0")));
@ -195,6 +196,10 @@ public class IITC_Mobile extends Activity
Long forceUpdate = sharedPreferences.getLong("pref_last_plugin_update", 0);
if (forceUpdate == 0) mFileManager.updatePlugins(true);
return;
} else if (key.equals("pref_update_plugins_interval")) {
final int interval = Integer.parseInt(mSharedPrefs.getString("pref_update_plugins_interval", "7"));
mFileManager.setUpdateInterval(interval);
return;
} else if (key.equals("pref_press_twice_to_exit")
|| key.equals("pref_share_selected_tab")
|| key.equals("pref_messages")