aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2015-10-23 22:26:55 +0200
committersteckbrief <steckbrief@chefmail.de>2015-10-23 22:26:55 +0200
commit389e3d4f0f5116f5ea22cc7c5e8cec1e6c791e3a (patch)
treede9aad5a69444199fccef87f81709bde5a7689b3 /src/main/java/de
parentbdc211a67a25298eb05854ff7e98461223e21bc5 (diff)
parent7aed735df28984e76486f23d17d02981b268930e (diff)
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java4
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ConversationsPlusPreferences.java15
-rw-r--r--src/main/java/de/tzur/conversations/Settings.java14
3 files changed, 19 insertions, 14 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java b/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java
index 0ca0b394..f86c509a 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java
@@ -27,6 +27,10 @@ public class ConversationsPlusApplication extends Application {
ConversationsPlusPreferences.init(PreferenceManager.getDefaultSharedPreferences(getAppContext()));
}
+ public static ConversationsPlusApplication getInstance() {
+ return ConversationsPlusApplication.instance;
+ }
+
/**
* Returns the application's context.
* @return Context the application's context
diff --git a/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusPreferences.java b/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusPreferences.java
index 788aed41..b20cfb8f 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusPreferences.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusPreferences.java
@@ -13,6 +13,21 @@ public class ConversationsPlusPreferences extends Settings {
private static ConversationsPlusPreferences instance;
private final SharedPreferences sharedPreferences;
+ /**
+ * Whether automatic downloads should only be done when connected to Wifi or not.
+ * @return
+ */
+ public static boolean autoDownloadFileWLAN() {
+ return getBoolean("auto_download_file_wlan", true);
+ }
+ /**
+ * Whether image-links should be downloaded or not.
+ * @return
+ */
+ public static boolean autoDownloadFileLink() {
+ return getBoolean("auto_download_file_link", true);
+ }
+
public static boolean showDynamicTags() {
return getBoolean("show_dynamic_tags", false);
}
diff --git a/src/main/java/de/tzur/conversations/Settings.java b/src/main/java/de/tzur/conversations/Settings.java
index 23eb3ee4..ffdce86d 100644
--- a/src/main/java/de/tzur/conversations/Settings.java
+++ b/src/main/java/de/tzur/conversations/Settings.java
@@ -40,12 +40,6 @@ public abstract class Settings {
case "led_notify_color":
Settings.LED_COLOR = preferences.getInt(name, Settings.LED_COLOR);
break;
- case "auto_download_file_wlan":
- Settings.DOWNLOAD_ONLY_WLAN = preferences.getBoolean(name, Settings.DOWNLOAD_ONLY_WLAN);
- break;
- case "auto_download_file_link":
- Settings.DOWNLOAD_IMAGE_LINKS = preferences.getBoolean(name, Settings.DOWNLOAD_IMAGE_LINKS);
- break;
case "confirm_messages_list":
int iPref = Settings.CONFIRM_MESSAGE_RECEIVED && Settings.CONFIRM_MESSAGE_READ ? 2 : Settings.CONFIRM_MESSAGE_RECEIVED ? 1 : 0;
try {
@@ -72,14 +66,6 @@ public abstract class Settings {
*/
public static int LED_COLOR = 0xffffffff;
/**
- * Boolean if image-links should be downloaded or not.
- */
- public static boolean DOWNLOAD_IMAGE_LINKS = true;
- /**
- * Boolean if automatic downloads should be done only jif connected to WLAN.
- */
- public static boolean DOWNLOAD_ONLY_WLAN = true;
- /**
* Boolean if confirm received messages
*/
public static boolean CONFIRM_MESSAGE_RECEIVED = true;