aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/tzur
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/tzur')
-rw-r--r--src/main/java/de/tzur/conversations/Settings.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/java/de/tzur/conversations/Settings.java b/src/main/java/de/tzur/conversations/Settings.java
index 72084285..c919d60c 100644
--- a/src/main/java/de/tzur/conversations/Settings.java
+++ b/src/main/java/de/tzur/conversations/Settings.java
@@ -15,7 +15,7 @@ public final class Settings {
*/
public static void initSettingsClassWithPreferences(SharedPreferences preferences) {
Log.d("SETTING", "Initializing settings");
- String[] preferenceNames = { "parse_emoticons", "send_button_status", "led_notification_color", "auto_download_file_wlan", "auto_download_file_link" };
+ String[] preferenceNames = { "parse_emoticons", "send_button_status", "led_notification_color", "auto_download_file_wlan", "auto_download_file_link", "confirm_messages_list" };
for (String name : preferenceNames) {
Settings.synchronizeSettingsClassWithPreferences(preferences, name);
}
@@ -44,6 +44,16 @@ public final class Settings {
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 {
+ iPref = Integer.valueOf(preferences.getString(name, new Integer(iPref).toString()));
+ } catch (NumberFormatException e) {
+ // ignored, fallback-value set above
+ }
+ Settings.CONFIRM_MESSAGE_RECEIVED = iPref >= 1;
+ Settings.CONFIRM_MESSAGE_READ = iPref >= 2;
+ break;
}
}
/**
@@ -66,6 +76,14 @@ public final class Settings {
* 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;
+ /**
+ * Boolean if confirm read message
+ */
+ public static boolean CONFIRM_MESSAGE_READ = true;
/**
* This is a utility class - private constructor avoids any instantiation.