From 232e7bba2d6396e3a0f5620b568d4b55a9d7eb38 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 14 Jan 2013 12:10:57 -0800 Subject: [PATCH] A conversation can't be trimmed to 0. --- .../securesms/ApplicationPreferencesActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index 67f679e655..e3da323780 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -382,6 +382,10 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity { Log.w("ApplicationPreferencesActivity", nfe); return false; } + + if (Integer.parseInt((String)newValue) < 1) { + return false; + } preference.setSummary((String)newValue + " " + getString(R.string.ApplicationPreferencesActivity_messages_per_conversation));