Fix display error in account settings

* correctly initialize summary of 'Server search limit'.
* don't persist value in shared preferences
This commit is contained in:
cketti 2014-01-31 22:10:28 +01:00
parent a62f7aaa29
commit f224483df4
2 changed files with 8 additions and 3 deletions

View file

@ -430,7 +430,10 @@
</PreferenceScreen>
<PreferenceScreen android:title="@string/account_settings_search" android:key="search">
<PreferenceScreen
android:title="@string/account_settings_search"
android:key="search">
<CheckBoxPreference
android:key="remote_search_enabled"
android:title="@string/account_settings_remote_search_enabled"
@ -438,6 +441,7 @@
android:persistent="false"/>
<ListPreference
android:persistent="false"
android:entries="@array/account_settings_remote_search_num_results_entries"
android:entryValues="@array/account_settings_remote_search_num_results_values"
android:key="account_remote_search_num_results"

View file

@ -510,7 +510,6 @@ public class AccountSettings extends K9PreferenceActivity {
}
}
);
updateRemoteSearchLimit(mRemoteSearchNumResults.getValue());
//mRemoteSearchFullText = (CheckBoxPreference) findPreference(PREFERENCE_REMOTE_SEARCH_FULL_TEXT);
mPushPollOnConnect = (CheckBoxPreference) findPreference(PREFERENCE_PUSH_POLL_ON_CONNECT);
@ -520,7 +519,9 @@ public class AccountSettings extends K9PreferenceActivity {
mPushPollOnConnect.setChecked(mAccount.isPushPollOnConnect());
mCloudSearchEnabled.setChecked(mAccount.allowRemoteSearch());
mRemoteSearchNumResults.setValue(Integer.toString(mAccount.getRemoteSearchNumResults()));
String searchNumResults = Integer.toString(mAccount.getRemoteSearchNumResults());
mRemoteSearchNumResults.setValue(searchNumResults);
updateRemoteSearchLimit(searchNumResults);
//mRemoteSearchFullText.setChecked(mAccount.isRemoteSearchFullText());
mIdleRefreshPeriod.setValue(String.valueOf(mAccount.getIdleRefreshMinutes()));